System and method for variable length encryption

ABSTRACT

Systems and methods for performing a secure transaction provided. In one embodiment, the method includes: reading data on a command token, reading data on a token; encrypting the token data with a key; encrypting an authentication data with a clear text token data; and transmitting the encrypted authentication data with the encrypted token data to a remote device.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a divisional of and claims priority from U.S. application Ser. No. 13/081,450 filed Apr. 6, 2011, which is a continuation-in-part of and claims priority from both U.S. application Ser. No. 11/550,387 filed Oct. 17, 2006 and U.S. application Ser. No. 12/481,504 filed Jun. 9, 2009, each of which is incorporated herein by reference in its respective entirety.

TECHNICAL FIELD

Some embodiments of the present invention relate to secure transactions and access authorization.

DESCRIPTION OF THE RELATED ART

Token systems have been in use in modern civilization in various implementations to provide and control many forms of access. Access that can be and often times is controlled by tokens can include physical access to rooms, buildings, areas and so on; electronic access to servers and data files; electronic account access; and so on. Another form of access controlled by tokens is the ability to conduct transactions such as, for example, credit, debit and other financial transactions. Credit cards, charge cards, debit cards, loyalty cards and other purchase-related tokens are used to provide the consumers with ready access to funds. Such transactions can enhance convenience of purchases, extend credit to customers, and so on.

As modern society has evolved, so have our tokens. Early tokens included physical objects such as coins, documents, and other physical objects. One example of a simple physical object token is the subway token made famous by the New York subway system. This simple token resembled a coin, could be purchased at kiosks, and was used to control access to the subway system. Another example of simple physical token for granting access was the early railway token developed in the 19^(th) century for the British railway system. This token was a physical object, such as a coin, that a locomotive engineer was required to have before entering a particular section of the railway. When the train reached the end of the section, the driver left the token at a drop point so the next train going the other way could use it. Because there was only one token for a given section of railway, the token system helped to ensure that only one train would be on that section of the track at a given time.

The railway token system minimized the likelihood of head on collisions, but this simple token also limited the ability for trains to follow one another along a given section. As such, the system evolved into a token and ticket system. In this system, if a train reached a checkpoint and the token was present, the driver was given a ticket to pass, leaving the token in place in case another train approached that section travelling in the same direction. Safeguards were implemented to ensure that tickets were correctly issued. As technology evolved, the physical token and ticket system evolved to include electronic signaling to control access to sections of the railway.

Another example of tokens to grant access are charge cards, credit cards and debit cards. Some attribute the ‘invention’ of credit cards to Edward Bellamy, who described them in his 19^(th) century novel Looking Backward. Early cards were reportedly used in the early 20^(th) century United States by fuel companies and by Western Union. By mid century, Diners Club produced a charge card for merchant purchases, which was followed shortly thereafter by American Express. These cards, now ubiquitous in our society, allow customers to make purchases and conduct transactions with relative ease. Early cards were embossed with a customer account number, which was manually transferred to a receipt via a carbon transfer process. Modern cards, or tokens, have evolved to use electronic mechanisms of storing data including, for example, magnetic stripes, RFID tags, and smart card and chip card technologies.

Other examples of tokens include government issued IDs such as driver's licenses and passports. Such tokens can also be used to control access in various forms. For example, a passport can be used to control access to countries and regions. Passports can also be used to access employment and licensing opportunities as a document to prove the holder's citizenship. A driver's license is another form of token, allowing access to driving privileges, and to establishments requiring proof of identity, residency or age. Still other examples of tokens can include bank drafts, stock certificates, currency and other token items relating to finance. Still further token examples can include tokens for physical access and security such as keys, card keys, RF or LC cards, RFID tokens, toll road transponders, and the like.

As these examples illustrate, the use of tokens for various forms of access has gained popularity in various business and industries and has evolved to embrace newly developed technologies. Tokens are not limited to these examples, but can take on various forms and use various instrumentalities and control, govern or arbitrate various forms of access in a variety of different ways. One downside of token access, however, is the opportunity to defraud the system. For example, stolen or counterfeited tokens are often used to gain unauthorized access. In fact, the Federal Trade Commission reports that credit and charge card fraud costs cardholders and issuers hundreds of millions of dollars each year.

One downside of token access, however, is the opportunity to defraud the system. For example, stolen or counterfeited tokens are often used to gain unauthorized access. In fact, the Federal Trade Commission reports that credit and charge card fraud costs cardholders and issuers hundreds of millions of dollars each year. As the importance of token access has grown so has the ability of those seeking to defraud the system. These attackers often seek to gain access to valuable data through multiple means including operating system and application security weaknesses and often use sophisticated computer algorithms to attack token security. Such attacks may take the form of repetitive attempts to access the protected system, with each attempt providing additional information. The security of the data is improved when an attacker must make a tremendous number of encryption queries or invest an unreasonable amount of computation time to gain access to encrypted information.

However, simple static tokens such as bank cards for example, typically do not require sophisticated algorithms for attack. Because these tokens are static and the data does not change from used to use, the token can be compromised simply by copying the token data to another token. Indeed, bankcard data is often copied or skimmed by attackers who gain access to the cards and perform an authorized swipe a card reader that stores information or who attach their own counterfeit card reader to a legitimate card reader (such as at an ATM terminal) to skim the data from an unwitting user when he or she uses the ATM terminal.

Token systems are not the only data systems that are susceptible to attacks. Accordingly, a number of encryption, ciphering or other obfuscation techniques have been developed to secure blocks of data in a number of applications and environments. For example, the Data Encryption Standard (DES) is an encryption technique based on a symmetric-key algorithm that uses a 56-bit key to encrypt data. DES was adopted as an official Federal Information Processing Standard (FIPS) for the United States and has enjoyed widespread use internationally as well. In more recent applications, the Advanced Encryption Standard (AES) cipher has also been used.

All of these techniques require that the data be transmitted in one or more fixed size blocks. Each block is typically, for example, 64, 128, 256 or 512 bytes in length. If the data does not conform to the block size used by the cipher, the remaining portion of the block must still be sent for the data to be recovered. Accordingly, data strings are often padded to fill out the data block, resulting in inefficiencies. In addition these techniques also restrict the data to a defined symbol set. In the case of DES, each of the eight bytes contained within a sixty-four bit block contain all values from 0-255. Many existing transmission formats require that a byte value be limited to the digits zero through nine or the letters A-Z.

In operation, DES takes a input comprising a fixed-length string of cleartext bits and encodes it to form a ciphertext bitstring of the same length. Like many encryption techniques, DES uses a key to perform the encryption, adding a measure of security in that the key is typically required to decrypt the ciphertext string. The DES algorithm divides the data block into two halves and processes them using a Feistel routine, one half at a time.

The Advanced Encryption Standard, is also a block cipher that works on fixed-length blocks of data. Like DES, AES also takes an input block of a certain size, usually 128, and produces a corresponding output block of the same size, and uses a secret key to perform the encryption. Unlike DES, which is based on the Feistel scheme, AES is a substitution-permutation network, which is a series of mathematical operations that use substitutions and permutations.

BRIEF SUMMARY OF EMBODIMENTS OF THE INVENTION

According to one or more embodiments of the invention, various features and functionality can be provided to enable or otherwise facilitate various forms of token transactions. Particularly, in accordance with one aspect of the invention, data security techniques such as, for example, various forms of encryption, can be implemented with token systems to provide a measure of security in the token data. In one embodiment, information from tokens of various forms can be encrypted on the token itself and can also be encrypted as the data is read by a data capture device used to read data from the token.

For example, in one application, an encryption module can be included to encrypt the data that is read from the token. Preferably, in one embodiment, the data is encrypted as soon as it is read from the token to provide an additional measure of security. To further enhance security in one embodiment, the encryption module, including encryption algorithms and keys, is encapsulated with the data capture device (which may be included with a terminal) and the encapsulation prevents or deters would be tamperers from reverse engineering encryption algorithms for obtaining the keys. Security measures can also be provided to destroy, alter, or otherwise render encryption information unusable in the event of attempted tampering.

For example, in one embodiment, potassium or other reactive material can be included in the head packaging, such that if the head is opened, the material reacts with the environment, destroying the encryption information.

The data capture device can be configured to output a secure data stream that includes encrypted token data. In one embodiment, the data capture device can be configured to package the encrypted token data in the same form and format as conventional non-encrypting systems such that the transaction package can be sent to the terminal in a form and format anticipated by the terminal. In this manner, in one embodiment data capture devices can be plug-and-play compatible with terminals or other transaction processing equipment. Such an embodiment can facilitate upgrades to the transaction processing network to include data security features without requiring extensive retrofits to downstream equipment.

For example, in the case of bank cards, replacement heads can be provided for magnetic stripe readers that include encryption functionality encapsulated with the read head. The encrypting head can be of the same form factor and can be configured to output the same signals as conventional non-encrypting heads such that the new heads can be easily replaced with existing heads to upgrade data capture devices or terminals without extensive modifications. Of course, in other embodiments, plug-and-play compatibility is not intended and data capture devices, terminals and other equipment can be designed as may be appropriate to communicate with one another in a variety of formats for a given application.

Another feature that can be provided in accordance with the present invention is a secure transaction module that can be used to, among other functions, decrypt data. For example, in one embodiment, a secure transaction module can be provided at one or more points in the transaction processing network to decrypt data that has been encrypted by the data capture device or to decrypt data that is encrypted on a token. Thus, this decryption functionality can be used to obtain clear text token data to facilitate consummation of the transaction. Secure transaction modules can be placed at appropriate points on the network depending on factors such as network security and desirability of obtaining clear text information at points along the network.

For example, in one embodiment, a secure transaction module can be included at a network router such as a gateway to provide decryption of some or all of the token data that has been encrypted to facilitate transaction routing and processing. The secure transaction module can also be configured to re-encrypt the data prior to transmission to another entity in the processing network. For example, a secure transaction module at a gateway may be included to decrypt a sufficient amount of the token data to facilitate further routing and leave the remainder of the data encrypted for later decryption by the transaction processor. As another example, the gateway may decrypt all of the token data as a service to the transaction processor and provide clear text data to the transaction processor to facilitate transaction processing. In such an embodiment, the secure transaction module at the gateway can be used to manage decryption services for a plurality of transaction locations and a plurality of transaction processors. Thus, the gateway can be configured to decrypt some or all of the token data as may be appropriate for the given transaction processing network and the given transaction. The gateway may also be configured to re-encrypt some or all of this data prior to forwarding the information along to the transaction processor.

In one embodiment, different keys can be used to encrypt different portions of the token data or to re-encrypt token data in the transaction. Using multiple keys to perform encryption of particular pieces of data can be used to manage the security of those pieces of data and to provide selective access to the clear data at desired locations in the network.

In yet another embodiment, features and functionality can be provided to assist detecting duplicate transactions. For example, transactions can be hashed to generate unique hash codes used to verify that subsequent transactions are not replays of an earlier transaction. Additionally, sequence numbers, signature detection and other techniques can be used to verify the authenticity of a token and a given transaction.

In accordance with another embodiment, token signatures can be used to authenticate the authenticity of a token as well as to further validate the transaction. For example, in one embodiment, the data capture device can be configured to encrypt token data as well as determine a token signature. The token signature can be determined in also encrypted and included in the data that is sent for processing the token transaction. Any number of signature techniques can be used including, for example, the SECURESTRIPE® detection technology available from SemTek Innovative Solutions, Inc., in San Diego, Calif.

In one embodiment, the signature information and the token data can be packaged in a format compatible with downstream equipment, and in another embodiment, compatible with conventional equipment to facilitate plug and play compatibility of the data capture device with conventional equipment. The signature information included with the transaction data can be used to authenticate the token. In one embodiment, signatures can be encrypted using keys different from the token data to allow authentication to occur independently of clearing the token data. In another embodiment, the signature can be used as the key to encrypt the token data. In such an embodiment, it is possible to use signatures at the processing end to decrypt the token data. If a card is not authentic, the encrypted data may not be capable of being decrypted by the set of keys available at the processing server. Thus, using the signature to encrypt the data can provide another measure of security.

As previously noted, any number of keys can be used to provide the encryption of some or all of the token data. For example, particular keys based on information such as a terminal ID, a merchant ID, equipment serial numbers, checkpoint station identification, or other unique identifiers can be used to provide a measure of security in the data. Additionally, time stamp information, location information and other ancillary information can also be provided to facilitate detection of fraudulent transactions. Using unique keys or other ancillary information can be used to detect the source of fraudulent transactions and to detect the occurrence of fraudulent transactions in the first place.

For example, consider a scenario where encrypted token data is received and the designated key fails to properly decrypt the token data. In such a scenario, the received information can be decrypted using a plurality of keys available to the transaction processor until a valid data set is deciphered. Once a valid data set is deciphered, the key can be used to trace back to the source of the fraudulent data. Likewise, tagging the information with time and location data can be used to perform checks such as checks for duplicate transactions and checks to verify that the location from which the data originated is a designated location for the given terminal.

In accordance with another embodiment, additional measure of security can be provided by encrypting additional information such as, for example, a PIN code or other ancillary information. For example, PIN codes, passwords, signatures, biometric or other information that may be provided to authenticate a user can also be encrypted to provide a measure of security in that information. Thus, in one embodiment, the encryption module can be used to encrypt this ancillary information. A secure transaction module can likewise be used to decrypt the pin or other ancillary information for appropriate data processing. It is noted that in one conventional application, conventional techniques utilize clear text token data to encrypt the pin in bank card transactions. However, in one embodiment, encrypted token information rather than clear text token information is used as a key to encrypt the pin data. As such, to provide functionality in a conventional network that is anticipating a pin encrypted with clear text information, a feature can be provided to decrypt the pin using the encrypted token information, decrypt the token information, re-encrypt the pin using the clear text token information and forwarding the token information and pin to the transaction processor. Additionally, the token information can be re-encrypted to ensure data security.

In another embodiment of the invention, features and functionality can be provided to perform batch processing of token transactions. As such, in one embodiment, a secure transaction module can be implemented to include the functionality to process batch transactions from a plurality of sources and for a plurality of transaction processing entities. In one embodiment, a batch settlement file can be provided to the secure transaction module that includes data records for each of the transactions to be settled. Some or all of these transactions may include encrypted data such as, for example, data encrypted by the processes described herein. In one embodiment, when the batch settlement file is received, the data records can be parsed and checked to determine whether any or all of those records are encrypted. Information can be included with the batch settlement file to identify the source of the file, which may be used, in one embodiment, to identify the source of the data which may also identify the appropriate encryption key. The secure transaction module can be configured to obtain the correct key, decrypt encrypted records and return clear text information for settlement processing. Clear text transactions can then be processed for appropriate settlement. In one embodiment, a settlement file may contain transactions for multiple entities and thus may require forwarding the appropriate transaction records to the appropriate settlement entity. In such embodiments, further encryption can be used to provide a measure of security when forwarding the transaction records to the appropriate entities.

In accordance with yet another embodiment, command tokens can be provided to update transaction processing. For example, the command token can be used to initiate the update of encryption information including, for example, encryption keys, encryption algorithms, random number generators, sequence numbers, terminal ids and other information that might be used in the encryption process. In one embodiment, the command token can be used to update local data capture equipment as well as equipment at the transaction processor to ensure consistency of updates. In one embodiment, command tokens can include data formatted similar to a non-command token and the information handled much in the same way as a normal token transaction is handled by the transaction processing equipment. The command code or other information can be used to identify a token as a command token as may be appropriate for a different application. For example, in the case of a bank transaction, a particular BIN or BIN range can be used to identify a card as a command card. Detection of the BIN or BIN range can enable the processing equipment to identify new data as command data and respond to the command data accordingly.

According to one or more embodiments of the invention, various features and functionality can be provided to provide improved security for various forms of token transactions. Particularly, in accordance with one aspect of the invention, data security techniques such as, for example, various forms of variable-length ciphers, can be implemented for data transmission, including data transmission for use with token systems to provide an increased measure of security in the token data. In one embodiment, variable-length ciphers can be implemented while maintaining a fully deterministic system where any encrypted data decrypts to only the original data.

Accordingly, in some embodiments, a general cipher is used to capture encryption preserving arbitrary formats using a format-preserving Feistel such that the encryption can be format-preserving so that if the plaintext has some prescribed format, the encrypted ciphertext will have the same format. Consider a simple example of a cipher to map a name and address and credit card number in a predefined format. The cipher in this example can be configured to map an input (plaintext) of the form Name, Addr, CC to an output (ciphertext) of the form Name*, Addr*, CC*. Name*, like Name, must consist of two strings of letters each beginning with an upper case letter. Addr*, like Addr, must consist of alphanumeric characters, spaces, or commas followed by a valid postal code. CC*, like CC, must consist of 8-19 decimal digits followed by the output of the function L when applied to those digits. Furthermore, in this example, the ciphertext must be of the same length as the plaintext. For example, the ciphertext must occupy the same space as the plaintext and have the format necessary to be accepted by the software.

In some embodiments, a new primitive referred to as a general cipher is used. Unlike a conventional cipher, a general cipher has associated to it a family {Dom(l)}lεI of domains where I is some index set. For every key K, index l, and tweak T the cipher specifies a permutation ET,l K on Dom(l). Making the general ciphers tweakable can provide enhanced security. A construction (called format-preserving Feistel) of a general cipher is provided that is able to produce a cipher over an arbitrary given domain {Dom(l)}lεI, which enables FORMAT-PRESERVING ENCRYPTION preserving arbitrary formats.

Consider the example of format-preserving encryption of credit card numbers. In this example, the goal is for the ciphertext CC*, like the plaintext CC, to be a sequence of digits whose last digit is the value of the function L applied to the other digits. Likewise, the length len(CC*) of CC* should be the same as the length len(CC) of CC. Assume the length ranges from 8 to 20 digits. Let I=(8, 9, . . . 20) and let Dom(l) be the set of all l-digit numbers whose last digit is the value of L applied to the other digits. Now a general cipher E over (Dom(l)lεI can be used. Encrypt CC (under key Kand tweak T) by letting l=len(CC) and letting the ciphertext be CC*=ET,l K (CC), which has the desired format.

Moreover, this approach can be extended to cover more complex formats and a domain can be specified that captures the full example discussed above. The format-preserving Feistel in some embodiments is able to provide a general cipher over an arbitrary, given domain. The starting point can be the arbitrary domain cipher of Black and Rogaway, which combines a generalization of an unbalanced Feistel network with a technique called cycle walking. A format-preserving Feistel can be implemented to extend this to handle multiple domains with the same key and also to incorporate tweaks, and can be customizable. The round function is a parameter and can be based on a block cipher such as AES or DES, or on a cryptographic hash function such as SHA-256.

In various embodiments, some information about the plaintext (namely the format) is leaked by the ciphertext. One notion of security adapts the traditional PRP notion to general ciphers to capture no more than the format being leaked. Another uses a weaker message privacy (MP) and a still weaker notion of message recovery (MR) of security, because MP and MR are more efficient and may provide better security than PRP. (In the latter case a lot of security is often lost due to birthday attacks that don't threaten MP or MR.) This is particularly important in a context where domains may be small—for example, encrypting only 12 digits of a credit card number.

In an embodiment of the invention, a method is provided for enciphering data such as, for example, token information or other data. The method can be configured to use DES, AES or any other block cipher as the randomizing element of a modified Feistel network, and can also be implemented where the transmitted data is not limited to a fixed size block. Accordingly, the data can be of any length. For example, in some embodiments the string length ranges from one digit to 19 digits for VDES, and one to 66 digits for VAES. In accordance with one aspect of the invention, any secure randomizing function such as a deterministic random number generator could be used in place of the described block cipher randomizing function where the transmitted block size is related to the key length.

In an embodiment of the invention, the modified Feistel network is configured to use modulo addition or subtraction rather than XOR functions in each round of the encryption. Modulo addition and subtraction allow any symbol set to be encrypted while provided ciphertext in a block size that is equal to the plaintext block size. For example, ten decimal digits encrypt to 10 decimal digits while 10 alpha numeric characters encrypt to 10 alpha numeric characters. This can be advantageous, for example, in environments where encryption is added to legacy systems that are expecting the data to be delivered in predetermined block sizes. This is of particular value in the above-described example environment of encrypting bankcard token information in an existing transaction network, where the length of the encrypted data and the resultant symbol set must match the data to be transmitted using exiting infrastructures.

In an embodiment of the invention, a method for deterministically encrypting a plaintext symbol set having a variable block size, includes the steps of dividing the plaintext symbol set into first and second portions; applying a first encryption key to encrypt a data string and generate a second encryption key, wherein the data string includes a tweak; computing a determined number of encryption rounds using the second encryption key to create an enciphered symbol set, wherein the encryption rounds comprise successive encryption and modulo combination of alternating portions of the symbol set; and providing the enciphered symbol set in the same form as the plaintext symbol set. In some embodiments, computing a determined number of encryption rounds using the second encryption key can include in a first encryption round encrypting the first portion of the symbol set using the second key and combining the encrypted first portion with the second portion of the symbol set using a modulo operation; in a second encryption round, encrypting the second portion of the symbol set using the second key and combining the encrypted second portion with the output of the first round using a modulo operation; and in a subsequent encryption round, encrypting the output of the previous round set using the second key and combining the encrypted output of the previous round with the output of a round prior to the previous round using a modulo operation; and providing enciphered symbol set in the same form as the plaintext symbol set.

Applying the first key can include defining first and second parameters based on the tweak, and encrypting a combination of the first and second parameters using the first key to generate the second key. The encrypting can be done by encrypting a first parameter with the first key to obtain an encrypted first parameter, combining the encrypted first parameter with the second parameter and encrypting the combination of the encrypted first parameter and second parameter using the first encryption key.

The plaintext symbol set can include a variety of different types of information. One example includes token information. For example, the plaintext symbol set can comprise bankcard track data in a standard bankcard track data format, and wherein the enciphered symbol set is provided in the same format as the plaintext bankcard track data. Similarly, the plaintext symbol set can comprise bankcard track data comprised of symbols selected from the group consisting of decimal digits zero through nine, the modulo combination comprises modulo 10 addition or subtraction and the enciphered symbol set is comprised of symbols selected from the group consisting of decimal digits zero through nine. As another example, the modulo combination can comprise modulo 62 addition or subtraction to encipher a plaintext symbol set comprised of symbols selected from the group consisting of alphanumeric upper and lower case characters and decimal digits zero through nine and to output.

Other features and aspects of the invention will become apparent from the following detailed description, taken in conjunction with the accompanying drawings, which illustrate, by way of example, the features in accordance with embodiments of the invention. The summary is not intended to limit the scope of the invention, which is defined solely by the claims attached hereto.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention, in accordance with one or more various embodiments, is described in detail with reference to the following figures. The drawings are provided for purposes of illustration only and merely depict typical or example embodiments of the invention. These drawings are provided to facilitate the reader's understanding of the invention and shall not be considered limiting of the breadth, scope, or applicability of the invention. It should be noted that for clarity and ease of illustration these drawings are not necessarily made to scale.

FIG. 1 is a diagram illustrating one example of a transaction network with which the present invention can be implemented.

FIG. 2 is a diagram illustrating an implementation of features that can be associated with the invention in accordance with one embodiment of the invention.

FIG. 3 is an operational flow diagram illustrating a process for enabling secure token transactions in accordance with one embodiment of the invention.

FIG. 4 is a diagram illustrating an example in which a transaction can be processed with the use of a gateway for routing in accordance with one embodiment of the invention.

FIG. 5 is an operational flow diagram illustrating an example process using multiple encryption keys to handle a transaction in accordance with one embodiment of the invention.

FIG. 6 is a block diagram illustrating one example implementation of encryption and decryption of multiple components of token data using separate keys for each component.

FIG. 7 is a block diagram illustrating an example configuration for a data capture device such as, for example, data capture device 113, in accordance with one embodiment of the invention.

FIG. 8 is a diagram illustrating an example flow for data encryption at a capture device in accordance with one embodiment of the invention.

FIG. 9 is a diagram illustrating another example of data encryption in accordance with another embodiment of the invention.

FIGS. 10 and 11 are diagrams illustrating one example application of a data encryption and token signature features in accordance with one embodiment of the invention.

FIG. 12 is an operational flow diagram illustrating an example process for handling token data that is encrypted on the token in accordance with one embodiment of the invention.

FIG. 13 is an operational flow diagram illustrating an example process for detecting a source of suspected fraudulent transactions in accordance with one embodiment of the invention.

FIG. 14 is an operational flow diagram illustrating a process for using time stamp information to detect potentially fraudulent activities in accordance with one embodiment of the invention.

FIG. 15 is an operational flow diagram illustrating an example process for encrypting some or all of the additional data, such as PIN data, in accordance with one embodiment of the invention.

FIG. 16 is an operational flow diagram illustrating an example process for decrypting additional information such as, for example, PIN data, in accordance with one embodiment of the invention.

FIG. 17 is a block diagram illustrating an example application for PIN encryption in accordance with one embodiment of the invention.

FIG. 18 is a diagram generally illustrating such a batch settlement process in accordance with one embodiment of the invention.

FIG. 19 is a diagram illustrating one possible encryption technique in accordance with one embodiment of the invention.

FIG. 20 is an operational flow diagram illustrating a process for processing batch settlements where some or all of the account data has been encrypted, in accordance with one embodiment of the invention.

FIG. 21 is a diagram illustrating an example process for data encryption in accordance with one embodiment of the invention.

FIG. 22 is a diagram illustrating a process for performing such encryption in accordance with this embodiment of the invention.

FIG. 23 is an operational flow diagram illustrating a process for encrypting a portion of the account number in accordance with one embodiment of the invention.

FIG. 24, which comprises FIGS. 24A, 24B and 24C, is a diagram illustrating an example of creating a pad and translating the PAN (primary account number) using substitution tables in accordance with one embodiment of the invention.

FIG. 25 is a diagram illustrating encryption of the PAN in accordance with one embodiment of the invention.

FIG. 26 is an operational flow diagram illustrating an example process for encrypting discretionary data in accordance with one embodiment of the invention.

FIG. 27, which comprises FIGS. 27 a and 27 b, is a diagram illustrating an example of creating a pad and translating the PAN using substitution tables in accordance with one embodiment of the invention.

FIG. 28 is a diagram illustrating encryption of the discretionary data in accordance with one embodiment of the invention.

FIG. 29 is an operational flow diagram illustrating a process for initiating an update mode or other command mode in accordance with one embodiment of the invention.

FIG. 30 is an operational flow diagram illustrating an example process for encrypting some or all of the token data in accordance with one embodiment of the invention.

FIG. 31 is an operational flow diagram illustrating an example process for using the check character to determine whether the token is a command token in accordance with one embodiment of the invention.

FIG. 32 is a diagram illustrating an example procedure for handling command tokens in accordance with one embodiment of the invention.

FIG. 33 is an operational flow diagram illustrating an example process wherein a gateway or other downstream entity receives a command transaction and returns command information in accordance with one embodiment of the invention.

FIG. 34 is an operational flow diagram illustrating an example process for receiving this command information at the transaction processing server.

FIG. 35 is a diagram illustrating an example computing system with which software components can be executed.

FIG. 36, which comprises FIGS. 36-1 and 36-2, is an operational flow diagram illustrating an example process using VDES encryption to encipher access or other information in accordance with one embodiment of the invention.

FIG. 37 is an operational flow diagram illustrating an example subroutine of VDES encryption in accordance with one embodiment of the invention.

FIG. 38, which comprises FIGS. 38-1 and 38-2, is an operational flow diagram illustrating an example process using VDES encryption to decipher previously enciphered access or other information in accordance with one embodiment of the invention.

FIG. 39 is a listing of the VDES encryption and decryption algorithms and subroutine according to one embodiment of the invention.

The figures are not intended to be exhaustive or to limit the invention to the precise form disclosed. It should be understood that the invention can be practiced with modification and alteration, and that the invention be limited only by the claims and the equivalents thereof.

DETAILED DESCRIPTION OF THE EMBODIMENTS OF THE INVENTION

Various embodiments described herein are directed toward a system and method for providing a system for increasing security of transactions in various forms. In one embodiment, system provides systems and methods are described for using variable-length ciphers across a communication medium.

Before describing the invention in detail, it is useful to describe an example environment with which the invention can be implemented. One such example is that of a transaction card network including a token used to facilitate purchases or other transactions. FIG. 1 is a diagram illustrating one example of a transaction network with which the present invention can be implemented. Referring now to FIG. 1, an example of transaction network is a token network that can be used to authorize and settle purchases of various goods and services. Illustrative examples of implementations of such a transaction network are the charge card, credit card and debit card transaction networks used to facilitate purchase transactions and banking transactions by and among merchants and other businesses, banks and other financial institutions and individuals. Generally speaking, in such a transaction network, the customer utilizes a charge card, credit card, debit card or other token as a symbol of his or her identity, or as an identification of the account he or she would like to have charged for the transaction. The token is typically accepted by the merchant, the account information read, and used to credit the transaction. Merchants may ask for a driver's license or other form of identification to verify the identity of the purchaser in conjunction with the token issued.

The token data is then sent to the appropriate financial institution or institutions, or other entities for processing. Processing can include, in one or more steps, authorization, approval and settlement of the account. As the example in FIG. 1 illustrates, a token 101 can be used by the customer to facilitate the transaction. As stated, in this example environment, examples of token 101 can include a charge card, debit card, credit card, royalty card, or other token that can be used to identify such items as the customers, their account, and other relevant information. As a further example, a card such as a credit or debit card can include various forms of technology to store data, such as a magnetic stripe technology, processor or smart card technology, bar code technology or other technology used to encode account number or other identification or information onto the token. As such, a properly encoded token can include various forms of information relating to the purchaser such as, for example, the identity of the purchaser, information associated with the purchaser's account, the issuing bank or other financial institution, the expiration date, and so on.

As only one example of a token 110, a credit card can be used with a conventional magnetic stripe included on one side thereof. Conventional magnetic stripes can include three tracks of data. Further to this example, the ISO/IEC standard 7811, which is used by banks, specifies: that track one is 210 bits per inch (bpi), and holds 79 six-bit plus parity bit read-only characters; track two is 75 bpi, and holds 40 four-bit plus parity bit characters; and track three is 210 bpi, and holds 107 four-bit plus parity bit characters. Most conventional credit cards use tracks one and two for financial transactions. Track three is a read/write track (that includes an encrypted PIN, country code, currency units, amount authorized), but its usage is not standardized among banks.

In a conventional credit card token, the information on track one is contained in two formats. Format A, is reserved for proprietary use of the card issuer. Format B, which includes the following:

-   -   Start sentinel—1 character     -   Format code=“B”—1 character (alpha only)     -   Primary account number—up to 19 characters     -   Separator—1 character     -   Country code—3 characters     -   Name—2-26 characters     -   Separator—1 character     -   Expiration date or separator—4 characters or 1 character     -   Discretionary data—enough characters to fill out maximum record         length (79 characters total)     -   End sentinel—1 character     -   Longitudinal Redundancy Check (LRC), a form of computed check         character—1 character

The format for track two can be implemented as follows:

Start sentinel—1 character Primary account number—up to 19 characters Separator—1 character Country code—3 characters Expiration date or separator—4 characters or 1 character Discretionary data—enough characters to fill out maximum record length (40 characters total) LRC—1 character

Although a credit card with magnetic stripe data is only one example of a token that can be used in this and other environments, this example environment is often described herein in terms of a credit card implementation for clarity and for ease of discussion.

Upon entering into a transaction, a merchant may ask the customer to present his or her form of payment, which in this example is the credit card. The customer presents the token 101 (e.g., credit card) to the merchant for use in the transaction terminal 104. In one embodiment, the credit card can be swiped by a magnetic stripe reader or otherwise placed to be read by the data capture device 103. In the current example where a credit card utilizing a magnetic stripe is the token 101, data capture device 103 can include any of a variety of forms of magnetic stripe readers to extract the data from the credit card. In other embodiments or implementations, other forms of data capture devices 103, or readers, can be used to obtain the information from token 101. For example, bar code scanners, smart card readers, RFID readers, near-field devices, and other mechanisms can be used to obtain some or all of the data associated with token 101 and used for the transaction.

The data capture device is in communicative contact with a terminal 104, which can include any of a number of terminals including, for example, a point of sale terminal, point of access terminal, an authorization station, automated teller machine, computer terminal, personal computer, work stations, cell phone, PDA, handheld computing device and other data entry devices. Although in many applications the data capture device 103 is physically separated, but in communicative contact with, the terminal 104, in other environments these items can be in the same housing or in integrated housings. For example, terminals such as those available from companies such as Ingenico, Verifone, Apriva, Linkpoint, Hypercom and others.

Continuing with the credit card example, the customer or cashier can swipe the customer's credit card using the card-swipe device, which reads the card data and forwards it to the cashier's cash register or other terminal 104. In one embodiment, the magnetic stripe reader or other data capture device 103 is physically separated, but in communicative contact with, the terminal 104. In other environments these items can be in the same housing or in integrated housings. For example, in current implementations in retail centers, a magnetic stripe reader may be placed on a counter in proximity to a customer, and electronically coupled to the cash register terminal. The cash register terminal may also have a magnetic stripe reader for the sales clerk's use.

The customer may be asked to present a form of ID to verify his or her identity as imprinted on the token 101. For other transactions such as debit card transactions, the user may be required to key in a PIN or other authentication entry.

Continuing with the current credit card example, the terminal 104 can be configured to print out a receipt (or may display a signature page on a display screen) and the customer may be required to sign for his or her purchases, thus providing another level of authentication for the purchase. In some environments, terminal 104 can be configured to store a record of the transaction for recordkeeping and reporting purposes. Further, in some environments, a record of the transaction may be kept for later account settlement.

Typically, before the transaction is approved, terminal 104 seeks authorization from one or more entities in a transaction processing network 123. For example, the merchant may seek approval from the acquiring bank, the issuing bank, a clearing house, or other entity that may be used to approve such transactions. Thus, depending on the token type, institutions involved and other factors, the transaction processing network 123 can be a single entity or institution, or it can be a plurality of entities or institutions. As a further example, in one embodiment, transaction processing network may include one or more processors or clearing houses to clear transactions on behalf of issuing banks and acquiring banks. The transaction processing network also include those issuing banks and acquiring banks. For example, one or more entities such as Global Payments, Visa, American Express, and so on, might be a part of transaction processing network. Each of these entities may have one or more processing servers to handle transactions.

In some instances, the approval may also constitute the final settlement of the transaction resulting in the appropriate funds being transferred to consummate the transaction. In other embodiments, however, the authorization may simply be an authorization only and actual account settlement can take place in a subsequent transaction. For example, authorization may verify the validity of certain information such as the account number, expiration date, customer name, and credit limit to determine whether to approve the transaction. Settlement may be accomplished when a series of one or more approved transactions are sent to the appropriate institution(s) for transfer of the funds or other account settlement.

As illustrated in FIG. 1, a gateway 120 can be included to facilitate routing of transactions, authorizations and settlements to and from the appropriate entity or entities within the transaction processing network 123. For example, where a merchant accepts credit cards from numerous different institutions, the gateway can use the BIN (Bank Identification Number) obtained from token 101 and passed to gateway 120 to route the transaction to the institution(s) associated with the given BIN. As illustrated by flow arrow 122, not all transactions are necessarily routed through a gateway 120. Transactions may take other paths to the appropriate entity or entities in the transaction processing network 123. Additionally, the term gateway as used herein is not restricted to conventional gateway applications, but is broad enough to encompass any server or computing system configured to perform any or all of the described functionality. The term gateway is used for convenience only.

Although transaction processing network 123 is illustrated using only one block in the example block diagram environment of FIG. 1, this block can represent a single entity to which the transaction is routed for authorization or settlement, or a network of entities that may be involved with authorization and settlement. Communications among the various components in the example environment can be wired or wireless transmissions using a variety of communication technologies formats and protocols as may be deemed appropriate for the given environment. As one example, the currently available credit card processing network and protocol structure can be utilized as the environment with which embodiments of the invention can be implemented. In fact, in one embodiment of the invention, various features and functions of the invention can be implemented within current or legacy transaction processing networks to provide enhanced features while reducing the level of change or upgrade required to the networking infrastructure.

Having thus described an example environment, the present invention is from time-to-time described herein in terms of this example environment. Description in terms of this environment is provided to allow the various features and embodiments of the invention to be portrayed in the context of an exemplary application. After reading this description, it will become apparent to one of ordinary skill in the art how the invention can be implemented in different and alternative environments, including environments where it is necessary or desirable to encrypt data for transmission or storage. Indeed, the invention is not limited to bank card environments and can be implemented for numerous different forms of data encryption.

The present invention is directed toward a system and method for facilitating token access, and in one embodiment, providing enhanced security measures for token access. Particularly, in terms of the example and related environments, one embodiment provides security measures for financial transactions. One embodiment in this example application provides for encryption of some or all of the token data (credit card, charge card, debit card or other tokens) prior to transmission to the financial networks for authorization or settlement. Decryption can be performed at one or more appropriate points along the transaction path to recover some or all of the original data to enable the financial institution to determine whether to authorize the transaction or to conclude the settlement process.

Various systems and methods for utilizing variable-length ciphers for arbitrary format data are described. These are described in terms of examples of token access and for providing enhanced security measures for token access are herein described. Particularly, in terms of the example and related environments, embodiments provide security measures for financial transactions. One embodiment in this example application provides for variable length enciphering of some or all of the token data (credit card, charge card, debit card or other tokens) using a Variable Data Encryption Standard (VDES) algorithm. Another embodiment in this example application provides for variable length enciphering of some or all of the token data (credit card, charge card, debit card or other tokens) using a Variable Advanced Encryption Standard (VAES) algorithm. VAES may also be known as Rijndael encryption. Decryption can be performed at one or more appropriate points along the transaction path to reverse the enciphering using a predefined secret key. There are a number of conventional block cipher formats that have been developed and used in addition to DES and AES, including Blowfish, RC2, Skipjack, LOKI, RC5 and GOST. After reading the description contained herein, one of ordinary skill in the art will appreciate how the systems and methods described herein can be implemented with these and other alternative cipher algorithms.

FIGS. 2 and 3 are diagrams illustrating an example implementation of features and functionality associated with embodiments of the invention operating within a network. FIG. 2 is a diagram illustrating an implementation of features that can be associated with the invention in accordance with embodiments of the invention. Referring now to FIGS. 2 and 3, in a Step 86, data from a token 111 is read by a data capture device 113. A token can take any of the number of different forms previously mentioned, including the examples discussed above with reference to a token 101 in FIG. 1 forms, including the examples discussed above with reference to a token 101 in FIG. 1.

Additionally, in one embodiment, the data encoded in token 111 can be encrypted using the variable-length ciphers VDES or VAES during the fabrication or creation of token 111 or in the writing of the data onto token 111. Although token data can be referred to as being “on” for “in” a token, or encoded “onto” or “into” a token, such as token 111, these terms are not meant to imply or require a particular physical structure for encoding the token with data.

In a Step 88, an encryption module 132, which can include one or more encryption algorithms, is used to encrypt some or all of the token data. Although the encryption in accordance with the invention can take place at a number of different points along the data stream, it is preferable for security purposes that the encryption take place as soon as possible or practical in the data read cycle. Therefore, in one embodiment of the invention, the encryption module is in the data path immediately following the data capture. Preferably, then, the data can be encrypted as soon as it is read to enhance the security of the system.

To further enhance security, and provide safeguards against copying, skimming or other tampering, encryption module 132 can be encased in the same housing as the data capture assembly. Further, they can be encased in epoxy and steel, or other tamper-safe components to provide safeguards against tampering. Thus, in one embodiment, the entire data capture device can be encapsulated in a tamper-resistant package. As a particular example of this, consider an example application of the invention to facilitate secure credit card transactions. In this example application, a data capture device 113 can be implemented as a magnetic stripe reader with magnetic read or read/write heads used to extract data from the token 111. In this embodiment, encryption module 132 can be encapsulated with the magnetic heads using epoxy or other potting or sealing materials as well as steel or strong casing materials to provide safeguards against tampering with the unit. For example, the encryption module 132 and the read heads can be encapsulated in such a way that it would be difficult or impossible for a would-be tamperer to disassemble the unit to tap into the clear text data stream, or to reverse engineer the encryption algorithms, or to steal the encryption keys, without damaging the unit or leaving signs of tampering. As a further example, encryption module 132 can be implemented on a single substrate or in a single chip and packaged with the read head. Additionally, data detection circuitry and amplifiers (or other data read electronics) can likewise be included in the same chip package. The encryption module can be further implemented such that it does not store or transmit clear text account information to further help secure the information.

In another embodiment, pins or other contacts can be provided at predetermined locations in the package. The epoxy, resin, or other potting material can be a conductive material, thus creating a current path between and among the pins. Control logic in the head (for example, the processor) can measure the resistance across various paths between various pairs of pins. Thus, if an attempt is made to open the device or to probe the circuitry to obtain keys, algorithms or other encryption information, the resistance between one or more pairs of contacts will be changed. As such, intrusion can be detected. In one embodiment, the resistance values are used as a key by the processor to generate the encryption keys or other information. Thus, if the potting material is tampered with, the resistance changes, which changes the key, which affects the keys that the processor ultimately generates. As such, the encryption module will no longer generate valid encrypted data. Additionally, because the encryption keys are generated by the control logic using the key based on the resistance values, the encryption keys themselves are not available until generated. In use, they can be generated in realtime such that valid keys are not stored in the head. Not storing the keys adds a further measure of security. Various alternative contact configurations can be provided. For example, varying length pins can be provided around the periphery of the circuit board that houses the control logic. In one embodiment, pins ranging from approximately ½ mm to 1 mm are provided in an array or about the periphery and in contact with the potting material. In one embodiment, A/D ports of a processor can be used to measure the resistance values for the processor. In another embodiment, the contacts can extend into the head side as well. In such an application, if one were to attempt to cut the head to retrieve the keys, the pins would be cut, altering the resistance of the path between them.

In one embodiment, the potting material is created or used in a way that is non uniform, or otherwise not easily reproduced. Thus, for example, if the material characteristics vary in the manufacturing process or from application to application, the material cannot be easily removed and replaced while retaining functionality to create the correct keys. For example, amorphous or inhomogeneous materials can be used such that the conductive properties of the material may vary across its volume, or from application to application, thereby making the material difficult to remove and replace with the same characteristics. As another example, conductive screens or patterns can be used and embedded in the material to provide unique properties. For example, carbon fiber screens, mylar templates with conductive traces, nanotubes and other conductive elements and patterns can be used.

As such, these packaging and encapsulation techniques can be used to safeguard the integrity of the data stream and the encryption algorithms and keys. Additionally, in this example credit card application and other applications, the head or other data read assembly is typically fabricated with a certain degree of precision to enable accurate read and write operations. As such, removing or tampering with an appropriately packaged device could present difficulties for the would-be tamperer to reassemble the device with the level of accuracy and precision necessary to gain the appropriate read/write capabilities. As such, this example illustrates how encryption module 132 can be integrated with, encapsulated with or otherwise implemented with data capture device 113 to provide certain measures of security against tampering.

As stated above, encryption module 132 can be implemented so as to encrypt some or all of the data associated with token 111. Thus, the data output by the data capture device with the encryption module enabled can include an entire encrypted data stream, or a data stream having a combination of encrypted data and clear text data. In other words, in one embodiment, encryption module can be implemented to selectively encrypt only certain data items of the token data. Additionally, in one embodiment the invention can be implemented so as to disable encryption module 132 or otherwise bypass encryption module 132 to provide clear text data streams as may be necessary or desirable for a given application.

To better illustrate the process of selectively encrypting some or all of the token data, consider again an example credit card transaction. In such transactions, it may be desirable to encrypt the card account number (or at least a portion thereof) while leaving certain other token information in clear text. As a further example, consider current credit card transactions wherein a customer swipes his or her credit card through a magnetic stripe reader and the information is sent to a terminal 114, such as for example a point of sale terminal, to initiate the transaction. In these transactions, the point of sale terminal forwards the data to the transaction processing network 123 for authorization and, in many cases, prints a receipt for the customer to sign as well as a receipt for the customer's records.

Because it may be desirable in this and other applications to use certain token information in authorizing the transaction as well as to provide certain of this information on the various receipts, in such applications it may be desirable to leave certain of the token information in the clear to facilitate these operations. Thus, in one embodiment, encryption module 132 can be implemented to provide selective encryption of certain portions of the token data, while leaving other portions of the token data in a clear, or un-encrypted, state. In keeping with the above example, in one embodiment encryption module 132 is implemented so as to encrypt a portion of the account number to provide a certain measure of security to the account information. In one embodiment, encryption can be done using triple DES encryption, although other encryption techniques can be used.

Encryption module 132 in this example implementation can be configured so as to leave the bank identification number and last several digits of the account number in clear text, if desired. This may be desirable in some applications as having a bank identification number in clear text enables the terminal, gateway, or other routing components in the system to use this clear text bank identification number to appropriately route the transaction for approval and settlement. Additionally, leaving the last four digits of the account number in the clear, as illustrated by this example, can allow this information to be printed on receipts as well as to be checked by the cashier or other personnel enabling a physical inspection and comparison. As further example, the customer's name can be left in clear text to allow his or her name to be printed on the receipt or to be viewed on the terminal by the cashier for identification. As another example, in one embodiment, encryption module leaves the first digit of the bank identification number in clear text for recognition by the terminal as representing a valid range. As these examples illustrate, the invention can be implemented so as to select any or all of the token data fields to be encrypted (or portions thereof) as may be desired or required for a given application. Although the term bank identification number or BIN is sometimes used in this document, this term can refer to the traditional BIN used on bank cards, or more generally to any routing character, string or other information used to identify the source of the token or to route transactions. Likewise, the term bank cards can be used to refer to tokens such as, for example, credit cards, debit cards, loyalty cards, payment cards and the like, whether issued by a bank or other entity (for example, American Express, MasterCard, VISA, etc.) or institution, and whether in the form of a magnetic stripe card or otherwise.

In a step 94, the data captured by data capture device 113, and encrypted with encryption module 132, is forwarded to terminal 114 in furtherance of the transaction. In an application in accordance with the example environment, terminal 114 can include a cash register or other point of sale station or terminal, as an example. In other environments terminal 114 can be implemented as appropriate including, for example, checkpoint terminals, customs station terminals, point of access terminals, point of sale terminals, or other terminal appropriate for the given application.

In the application of a point of sale terminal, the terminal 114 can, in one embodiment, be a card swipe terminal such as, for example, those portable or countertop terminals provided by VERIFONE, INGENICO and others. Other point of sale terminals might include, for example, gas pumps, ATM machines, vending machines, remote pay terminals, and so on. As another example, a terminal might include a token reader in communicative contact with a personal computer or other computing device for purchases such as, for example, internet purchases or for online banking. As a further example, in one embodiment, the terminal can include a magnetic stripe reader (including one or more read heads), a keypad (for example, for PIN entry, or other user entry), and a display. Thus, in this embodiment, the terminal 114 is integrated into the same package or housing as the data capture device 113. The terminal can also be integrated with or in communicative contact with a cash register or other point-of-sale or point-of-access station.

In one embodiment, the data forwarded to terminal 114 is preferably packaged in a manner as may be expected by terminal 114. Thus, any of a number of packaging formats can be adopted for this and other communication channels in the transaction chain. However, in one embodiment, data capture device 113 can be implemented so as to package or format the data in a way that would be compatible with terminals 114 that may have been in use with previously-existing data capture devices that did not include encryption capabilities. As a specific example of this consider again the example application of a credit card transaction. In this example environment, a large number of magnetic stripe readers are currently in existence that provide clear text token data to existing terminals in a particular format that is expected by the terminal. Therefore, the data capture device can be configured to encrypt the data, place the encrypted string into the original location of the clear data that it replaces, recompute the checksum, include any sentinels or LRC and forward to the terminal. The terminal can then handle the transaction as a conventional transaction (for example, unencrypted transaction). In one embodiment, the terminal can check the check data (for example, with parity, LRC and a mod 10 check), which should be correct as it was regenerated by the encryption module using the inserted encrypted string. If the token fails, a bad read status can be output.

Thus, simply providing data encryption at the data capture device (e.g. at the magnetic stripe reader) could result in data incompatibility with the terminal, and with the rest of the network in some applications. As such, this embodiment packages the encrypted portions of the data with the clear text portions of the data in the same package format as the data would otherwise be presented to the terminal 114. As such, transactions (credit card transactions in this example) can be carried out in their usual fashion, without requiring terminal upgrades. As a further example of this, consider the example described above, but now assume that the personal account number of a credit card is encrypted as follows: the first six digits, or the bank identification number, are left in clear text, the next six digits are encrypted, and the last four digits of the account number are left in clear text. Thus, in this example, the encryption can be implemented such that the original six digits of the account number that are encrypted are replaced by an identical quantity (i.e. six) of encrypted digits, and these six encrypted digits are placed in the same position as the six clear text digits occurred in the account number of the data stream. As a result, the original packaging format of the Track Data is intact, and the data capture device with the encryption features (whether a new device or a retrofitted device) can be integrated into the network and be compatible with terminals that are expecting data from non-encrypting magnetic stripe readers.

In another embodiment, the encrypted data can be output in the same signal format as that anticipated by conventional terminals. For example, in the example environment, conventional magnetic stripe readers include a read head that reads the magnetic transitions and outputs the data as a string of transitions representing the track data. In such an environment, terminal 114 is expecting to receive a string of transitions in a given signal format (at specified signal levels or ranges) from the head. Thus, in this embodiment, encryption module 132 can be further configured to convert the encrypted data stream into a series of transitions at the signal levels expected by the terminal. As such, in this example, this embodiment allows the data capture device 113 to communicate with conventional terminal equipment without the need to change or upgrade the terminals.

Continuing with this example, in one embodiment, the head is configured to read the magnetically encoded data and to output a series of data transitions. The transitions can be converted to a series of characters representing the track data by encryption module 132. Encryption module 132 can further be configured to generate an LRC and check sum, if appropriate to the application. Thus, encryption module 132 creates track data character strings. Encryption module 132 is further configured to parse this track data to select appropriate portions of this data for encryption. For example, encryption module 132 may select portions of the account information for encrypting, while masking other data such as, for example, the BIN and expiration date. In one embodiment, encryption module 132 can be configured to re-package the data so that it is in the same format package as the unencrypted data. Then, encryption module 132 can be configured to convert this data to transitions that would otherwise be output by the read head absent the encryption technology. Thus, in this example, data stream 135 is formatted (both from a layout and signal perspective) in a manner as would expected by terminal 114 from a conventional head.

In embodiments where encryption module is packaged with (or otherwise integrated or included with) the head or other data capture device, the head unit can be used to replacing existing non-encrypting heads with encrypting heads that include the encryption module and that output the data in the same format as the non-encrypting head. Thus, in one embodiment existing terminals or other transaction processing equipment can be easily upgraded to be PCI compliant or to otherwise include encryption functions by swapping out a non-encrypting head with an encrypting head configured to output a compatible data format. Because in this embodiment the output is compatible, the head can be swapped out without impacting terminal 114.

In one embodiment, as discussed the encryption technology can be packaged with head technology into a smart head module package. The encrypting head module can be encapsulated to deter tampering. The head module can include, for example, encapsulated electronics to provide encryption, power management functions, and intelligent interfaces for any terminal/POS environment. The encrypting head can, for example, replace the existing read head in a conventional POS device; be connected externally to the POS device via a RS232 or USB port or other connection, wired or wireless; or be integrated into the device using methods such as I2C or SPI. Once an encrypting head is installed in a terminal, its new functionality can be configured to remain transparent (“hidden”). As further discussed below, the functionality can remain dormant until activated via a command token.

The encrypting head can be configured to encrypt the Track 2 card data selectively based on BIN number and POS/system requirements or otherwise. The data can be tested for accuracy with parity, LRC, and a Mod 10 check. If the card fails the parity or LRC checks, a “bad read” status is output. If the card passes the other checks and passes the Mod 10 check, the card BIN number is used to access the encryption parameters and keys. In one embodiment, each time the terminal head successfully decodes and encrypts card data, a counter can be incremented. In one embodiment, different counters can be established and updated for particular BINs or BIN ranges. In one embodiment, a six digit counter is sufficient to allow enough “uniqueness” in each transaction. In one embodiment, the two least significant digits are output with the card data (for example, in the PVV (pin verification value) field or other field) for use by the decryption module.

Illustrated in FIG. 2, is a secure data stream 135 in which some or all of the data has been encrypted by encryption module 132 before transmission to terminal 114. In a step 94, secure data stream 135 is forwarded to terminal 114 in furtherance of the transaction. As such, terminal 114 can use or forward some or all of the elements of data stream 135 as appropriate in conducting the transaction. Continuing with the example of a credit card sale, terminal 114, such as a point of sale terminal or a card-swipe terminal, can use this transaction data to obtain authorization for the transaction, obtain user input (for example, press “Yes” to approve the sale) as well as to print the receipts (or communicate with a cash register or other device to print receipts) or otherwise consummate the transaction.

In a step 96, terminal 114 routes the data to the transaction processing network 123 to obtain authorization or approval for the transaction from one or more entities as appropriate. The data stream 137 routed by terminal 114 can include some or all of the data provided in the secure data stream 135, and can be augmented to provide additional data as may be appropriate for the environment or type of transaction. In one embodiment, transaction data stream 137 is the same data and in the same format as secure data stream 135. In one embodiment, transaction data stream 137 can be formatted by terminal 114 in formats compatible with existing transaction processing equipment or in other formats as may be desirable or appropriate for a given application or network. For example, in one embodiment, a secure data stream 135 can be packaged in conformance with conventional terminal standards and sent to a conventional terminal 114, and processed and output by terminal 114 in accordance with its conventional standards. As another example, data stream 135 can be received by terminal 114 and terminal 114 can be configured to provide the packaging and signal conditioning for compatibility with downstream equipment. In yet another embodiment, to function with legacy transaction processing equipment, a replacement terminal with a compatible data capture device 113 (integrated or otherwise) can be provided to be plug-and-play compatible with the transaction processing network.

In some environments, the links between terminal 114 and the transaction processor(s) are relatively secure. As such, in one embodiment, terminal 114 can decrypt the data prior to transmission for transaction processing. Although not illustrated, terminal 114 can thus include decryption algorithms and keys used to decrypt the data prior to transmission. The decrypted data can be kept or formatted into in the same format as expected by the transaction processor. Additionally, terminal 114 can include an encryption module to encrypt some or all of the data output by terminal 114. Thus the data can be encrypted or reencrypted at the terminal prior to transmission. In one embodiment, the terminal processor, ASIC or other control logic used to decrypt or encrypt the data, and the associated keys, can be packaged in a secure manner such that if it is tampered with, the keys or other encryption information are automatically erased or otherwise destroyed. In another embodiment, the data capture device along with terminal components can be likewise packaged in a secure manner.

Illustrated in the example provided in FIG. 2 is a gateway 120 that also can be used to route the data stream. As discussed above with reference to FIG. 1, a gateway 120 may or may not be involved in the transaction routing depending on the application or transaction and the network configuration and participants, and other parameters such as, for example, the complexity of the network and the routing options available. For example, where multiple terminals 114 can be used to carry out transactions for credit cards from a plurality of issuing authorities, a gateway functionality can be useful to route the transaction data among the terminals and the elements of the transaction processing network.

As also discussed above with reference to FIG. 1, as used herein, the term “gateway” is broadly used to describe an entity, such as a server or other processing system, in the transaction stream that can be included to perform functions such as, for example, routing, interfacing, format or protocol conversion, storage, buffering and so on. For example, in one embodiment a gateway can be equipped for interfacing various terminals 114 with transaction processing network 123 or with various entities in transaction processing network 123. Further, in one embodiment, a gateway can be included to provide interfaces among various entities involved in the transaction. In terms of the example environment, a gateway may provide a common interface between a plurality of merchants and their terminals 114 on the one hand, and various banks, institutions or other entities on the other hand. Functionality that might be included in a gateway 120 can be, for example, protocol translation, data formatting, impedance matching, rate conversion, fault isolation, signal translation, buffering and storage, routing, or other functions as necessary or useful to provide interoperability or communications among transaction participants.

Gateways can be implemented using hardware software or a combination thereof. In one embodiment, gateway 120 is implemented as one or more processing devices configured to run software applications for the gateway functionality. In one or more embodiments discussed in this document, functions such as encryption, decryption, key storage and other related functions are at times discussed as being performed at or by a gateway. This description encompasses implementations where functions are performed using a separate module or appliance called by or otherwise accessed by the gateway. For example, in one or more embodiments, these functions are described as being performed by a secure transaction module that can be either a part of the gateway or accessed by the gateway. As will be apparent to one of ordinary skill in the art after reading this description, such discussion can indicate that the same devices that perform gateway functionality can also include hardware or software modules used to perform these encryption, decryption or other functions as well.

Alternatively, separate modules can be in communicative contact with the gateways and their functions called, accessed or used by the gateway to perform the encryption, decryption or other related functions. Indeed, in one embodiment, one or more separate appliances are provided to perform various decryption, encryption, key storage and updating and other functions, and the appropriate transaction data routed to the appropriate appliance for processing. Such appliances can themselves be implemented using hardware software or a combination thereof, and can be coupled in communicative contact with the gateway. As discussed herein, such appliances (sometimes also referred to as secure transaction modules) can be associated with entities other than the gateway, including issuing banks, acquiring banks, clearing houses, merchants and other entities that may be associated with, the transaction processing network 123.

In a step 98, the encrypted information is decrypted for processing of the transaction. In the example illustrated in FIG. 2, the transaction data stream or other appropriate transaction data is routed to the transaction processing network 123 entity or entities that will perform the authorization or other approval. In this example illustrated, the decryption occurs in this network or at this institution such that the clear text information can be recovered to facilitate transaction processing. The invention can be implemented so as to provide the decryption functions at any point in the transaction process as may be appropriate or desired for given security purposes. For example, once the transaction data reaches a secure processing network, it may be appropriate to decrypt the data within that network and handle the data as clear text because the network is secure. As another example, once the transaction reaches a clearing house, a secure transaction module can decrypt the information at or for the clearing house, and the transaction forwarded to the issuing bank for consummation. As yet another example, the transaction can remain encrypted until it reaches the issuing bank and can be decrypted at the issuing bank for processing. Where information is decrypted for handling or other processing (or for other purposes) prior to reaching its final destination, that information can be re-encrypted for subsequent transmissions.

As another example, connections between the gateway 120 and the transaction processing network 123 may themselves be secure connections. In such situations, it may be desirable to decrypt some or all of the transaction data stream at gateway 120 prior to routing to the transaction processing network 123. In furtherance of this example, consider a credit card transaction in which the entire account information is encrypted. It may be desirable in such a situation to have the gateway decrypt the account information to obtain the bank identification number to facilitate routing. With a secure connection, the decrypted information can be left in the clear for transfer to the transaction processing network 123. In another embodiment, the gateway can be configured to re-encrypt some or all of the decrypted information prior to routing.

As another example, even where the routing data is clear, it may be desirable to have a secure transaction module available at the gateway to decrypt the transactions routed by that gateway. As such, a centralized (or somewhat centralized in the case of multiple gateways) decryption process can be implemented to handle decryption in one location (or in predetermined locations) for multiple transactions for multiple merchants and multiple issuers. In such an application, centralized decryption can be implemented to provide centralized key management or centralized of other encryption algorithms or information.

Thus, to illustrate two of the possible decryption-placement scenarios, a decryption module is illustrated as decryption module 122A associated with transaction processing network 123 and a decryption module 122B associated gateway 120. As these examples serve to illustrate, decryption of some or all of the information can be performed at one or more points along the network as may be appropriate for a given transaction. As also discussed in further detail below, various levels of encryption and decryption using one or more keys for portions of the data can be included to facilitate routing and handling of transactions in a secure manner.

For example, the gateway can be configured to decrypt the transaction data stream, determine the routing or other gateway-specific information (for example reading the bank identification number for routing), and re-encrypt the data before forwarding it along to the transaction processing network 123. Additionally, in another embodiment as discussed above where the bank identification number, or a portion thereof, may be left in clear text, the gateway or other network components can be implemented to route the transaction based on the clear text bank identification number such that interim decryption and re-encryption is not used to determine this routing.

In another embodiment, where the secure transaction module is configured to decrypt account information, the secure transaction module can be configured so as to not store clear text account information for security purposes. Thus, in this embodiment, the appliance can be configured to receive encrypted information, perform a decryption and forward the clear text information without storing a local copy of clear text information. In one embodiment, however, hashes of the account information or other token data can be maintained at the secure transaction module to enable the module to check for duplicate transactions. In another embodiment, the secure transaction module can be configured to provide data for reporting or record keeping purposes. For example, the secure transaction module can provide hashes, transaction amounts, merchant IDs, terminal IDs, transaction dates, etc. for reporting transaction information or other data.

In one embodiment, each encrypted transaction from a merchant that is “hashed” would generate a unique hash code since each encrypted swipe is unique. The hash stored in the secure transaction module could be used to verify that subsequent encrypted transactions are not “replays” of an earlier transaction. This concept would work, however, in an implementation where “merchant A” and “merchant B” may not use the same gateway, a duplicate H-TDES transaction may not be caught since the hash would be stored in separate gateways. Therefore, in one embodiment, secure transaction modules at various gateways (or elsewhere in the processing network) may be configured to share generated hash codes (share information with one another or provide them to a central repository, for example) for comparison purposes to detect fraudulent transactions. The same situation can hold true when signature detection is implemented. Signature detection in one embodiment generates a unique identifier or data stream to represent the original card. To detection of a skimmed card or other fraudulent activities, signature data can be shared among secure transaction modules.

In one embodiment, the bank identification number or other processing information can be encrypted with a first key and account or other information encrypted with a second key. In this embodiment, the gateway or other designated entity can be provided with the first key such that it can decrypt the bank identification number or other transaction processing information that it may use in providing its services in the transaction. For example, where the bank identification number is encrypted and the gateway holds the keys (for example using a secure transaction module), transactions are routed to the gateway to decipher the bank identification number and determine routing. In one embodiment, routing of transactions can be determined based on which entities hold the keys. Additionally, because the account number or other information is encrypted with a second key, this information is not decrypted by the gateway but is passed along in encrypted form to facilitate the transaction. With this embodiment, it can be implemented such that the second key is not stored at the gateway or otherwise maintained at the gateway thus, making it more difficult for the account information to be compromised at the gateway. As such, in one embodiment, the system can be implemented such that the second encryption key is only stored at the transaction processing network to provide an enhanced measure of security for the account information. As another example, all but the first digit of the BIN can be encrypted. Leaving the first digit of the BIN in the clear can be used to facilitate routing by the terminal or other processing device.

As another example, in one embodiment, there can be a plurality of keys to manage different encryption functions. Furthermore, in one embodiment, the invention can be implemented such that the level and type of encryption performed by the encryption module is managed through various keys and also, in some instances, through command tokens (discussed further below). Thus, in one embodiment, a hierarchy key management can be established to include primary keys, OEM keys, merchant keys and terminal keys. In one embodiment, the primary keys can be used during the manufacture of encryption modules to manage serial numbers, and used to generate and enable the OEM key and command card. The OEM key can be used to generate command cards for various levels of encryption (for example, for various BIN ranges); and can also be used to generate and enable the merchant key and command card. The merchant key can be configured to use the same key and command card for all of a merchant's terminals, enabling the terminals to encrypt the Primary Account Number, for example. The merchant key can also be used to generate and enable the terminal key and command card. The terminal key, can be used in conjunction with a corresponding command card to delineate which discretionary data to encrypt in each of the tracks.

In one embodiment keys can be automatically managed and maintained by a key management module, which can be used as a service or as an appliance. As a service, keys can be remotely managed by merchants. Each merchant's terminal or group of terminals can be assigned a unique key that is used to decrypt the encrypted card data.

As these examples serve to illustrate, a number of different encryption and decryption scenarios can be provided, encrypting various portions of the data with various keys as well as providing appropriate decryption or re-encryption along the way, as may be appropriate for a given application or for the desired level of security or privacy in some or all of the data.

In a step 99, an authorization response is provided from the transaction processing network 123 indicating the status of the authorization. For example, where the transaction is approved, such authorization is transmitted to terminal 114 and can be stored at the terminal or in a storage device associated with the terminal for record-keeping purposes or further transactions. For example, considering again the application in a credit card transaction, when the initial transaction is carried out, terminal 114 typically seeks authorization from the transaction processing network 123 and, once authorized, stores transaction information in a data file or other database for later settlement of the transaction. Thus, in this example, terminal 114 could store information associated with the authorized transaction for later settlement as illustrated by step 100.

In one embodiment, an administrative toolkit can be provided for remote management of terminals and services. A variety of access mechanisms can be provided including, for example, an XML API that provides an interface for entities to extract critical reporting information from the secure transaction module and key management module, as well as providing the ability to remotely manage terminal statuses with or without the use of command cards. The reporting data available through the API can include information such as: vital statistics for the terminals, the security integrity of the terminals, the number of swipes per terminal, the number of rejected credit cards, and various other key metrics.

FIG. 4 is a diagram illustrating an example in which a transaction can be processed with the use of a gateway for routing in accordance with one embodiment of the invention. As discussed above, transaction data stream 137 is routed to the transaction processing network 123 for processing of the transaction, decryption 122 can take place at an appropriate point in the transaction processing network to ensure security of the transaction data. The appropriate authorization response 139 can then be sent back to the terminal in furtherance of the transaction.

As discussed above, various scenarios can be implemented to provide encryption of some or all of the token data with one or more keys, and decryption at appropriate points in the transaction processing chain to facilitate secure handling of transactions. To further illustrate this feature, another example embodiment is now described. To provide further illustration of this example embodiment, it is discussed in terms of the example environment and more particularly in terms of a credit card transaction. FIG. 5 is an operational flow diagram illustrating an example process using multiple encryption keys to handle a transaction in accordance with one embodiment of the invention. Referring now to FIG. 5, in a step 40, the token is read. Particularly in terms of this example, the token that is read in a step 40 is a credit card, and more particularly the Track 1 and 2 data can be read from the credit card by a magnetic stripe reader or other data capture device 103.

In a step 42, a portion of the credit card data is encrypted with a first key. Particularly, in this example, the primary account number (referred to as a PAN in some applications) read from the token is encrypted with the first key. As discussed above, in one embodiment, only a portion of the account number, or PAN, is encrypted while other portions are left unencrypted. The first key that can be used to encrypt the account number (or a portion thereof) can be selected by any of a number of techniques and properly distributed to the appropriate decryption device to facilitate data handling. In one embodiment, a terminal ID is used for the first encryption key. That is, either the terminal ID itself is the first key or the terminal ID can be used to generate or otherwise identify the first key for encrypting this portion of the account number. For example, the terminal ID can be used with a random number generator, substitution table or other algorithm to generate a key. As another example, the terminal ID can be used as an address or other identifier of the appropriate key stored in a table or database. Using the terminal ID as the encryption key or as a way to identify the encryption key can provide flexibility and features as further described below.

In a step 44, in this embodiment another encryption takes place. Particularly, in this embodiment, a different portion of the account number is encrypted with a second key. For example, the bank identification number, or a portion thereof, is encrypted using the second key. In some applications, the bank identification number (sometimes referred to as a BIN) is part of the account number. In some credit cards, for example, the BIN is the first six digits of the account number.

In one embodiment, the second key can be a key based on the merchant ID, or it can be some other key as may be appropriately selected and distributed. A key based on the merchant ID can be the merchant ID itself or a key generated from or identified by the merchant ID (as discussed above with respect to the Terminal ID). As such, as a result of steps 42 and 44, the token data is encrypted in such a way that a part of the account number is encrypted with a first key (for example, from the terminal ID) and the bank identification number is encrypted with a second key (for example, from the merchant ID).

In the step 46, the properly encoded data is routed for authorization. This data can be packaged so as to be compatible with various data formats, including conventional bank card transaction formats. Additionally, in one embodiment the data can be output at signal levels expected by terminal 114. This data may or may not be altered by a terminal such as terminal 114, depending on the transaction.

In this example, a gateway 120 is used to facilitate the routing of transactions. As such, in this example, the data is routed to the gateway 120 for further handling. Because the encryption in this example takes place at the data capture device 113, routing from the point of sale, point of authorization, or other terminal 114 might, in one embodiment, be accomplished via un-secure networks as some or all of the account information has been encrypted with one or more keys.

Although the routing appliance used in transaction processing in this and other examples is described as a gateway, any of a number of routing appliances, modules or mechanisms can be implemented or utilized to facilitate transaction routing or handling as may be deemed appropriate for a given application or environment. Thus, the term gateway, is used to generally describe such appliances or modules.

In a step 48, gateway 120 receives the transaction data and proceeds to determine appropriate routing for the transaction such that the transaction can be processed. Because, in this example, the bank identification number is encrypted, and it is this number that is used to determine routing, the gateway first decrypts the bank identification number such that the true bank identification number can be determined for routing. For example, the gateway can perform the decryption by sending the information to a secure transaction module for decryption. Once decrypted, gateway 120 routes the transaction to the appropriate institution as depicted by a step 50. In one embodiment, the gateway can re-encrypt the bank identification number using the same or different key.

Note that in one embodiment described above, the bank identification number was encrypted with a key based on the merchant ID. Thus, the gateway can use information about the merchant included with the transaction data to perform the decryption of the bank identification number as appropriate. For example, the gateway may be provided with a database of encryption keys indexed by merchant ID numbers. As such, the gateway can use the appropriate merchant ID to retrieve the appropriate decryption key from the table to perform the bank identification number decryption. In another example, where the merchant ID is used to create the encryption key, a similar algorithm can be provided at the gateway to generate the correct decryption key based on the merchant ID to perform the BIN decryption.

Prior to routing the transaction to the appropriate institution, gateway 120 can either re-encrypt the BIN or leave it in clear text as may be appropriate or desired for the transaction. Note that in one embodiment, it is preferred that the secure transaction module at the gateway not have access to the first key that is used to encrypt the remainder of the account information. As such, a measure of security can be provided to prohibit or deter decryption of the sensitive account information at the gateway 120. Stated another way, using separate keys to encrypt respective portions of information, enables the use and distribution of keys that can provide the ability to control selective decryption of the information at various points in the transaction network.

In a step 52, the appropriate institution receives the transaction routed by the gateway and decrypts the first portion of the account number with the first key. Following with the above example, where the first key is based on the terminal ID, the institution can use information about the terminal ID to recreate the key and provide the appropriate decryption. Once decrypted, the institution can determine whether to authorize the transaction and provide an appropriate response as illustrated in step 54. Thus, the terminal ID (which can refer to an ID of the data capture device or of the terminal 114), or other identifier, is, in one embodiment, appended to the data stream to enable the decrypting appliance (at the authorizing institution in this example) to identify the terminal ID and thus obtain the correct key for decryption.

In a step 56 the terminal can store the transaction for later settlement. For example, in terms of the example credit card transaction, the authorization can be stored for batch settlement purposes. Because, in this scenario, the terminal only had access to the information as encrypted by the data capture device, the information stored in the settlement file for later settlement remains encrypted. Thus, the system can be implemented to maintain or enhance data security during subsequent batch settlement or other settlement operations.

FIG. 6 is a block diagram illustrating one example implementation of encryption and decryption of multiple components of token data using separate keys for each component. Referring now to FIG. 6, and keeping with the example described above with respect to FIG. 5, encryption module 132 has access to and utilizes at least two keys, key 11 and key 12. In a given application, there may be many more keys available to encryption module 132 depending on the actual implementation. However, to conform to the example described above wherein a portion of the account number was encrypted with a first key, and the bank identification was encrypted with a second key, two keys, key 11 and key 12, are illustrated and used.

Still following the above example, encryption module 132 uses key 11 to encrypt a portion of the account number (for example, a portion of the PAN), to provide a measure of security in the account number. Encryption module 132 uses key 12 to encrypt the bank identification number (for example, another portion of the PAN) to provide additional security to the token data. In applications where the bank identification number, or other similar number, is part of the account number, this encryption also provides additional security for the account number. The data is packaged and sent as secure transaction data to the terminal in furtherance of the transaction.

In this and other embodiments, either or both encryption steps need not be performed at the data capture device 113, and can instead be performed by terminal 114 or at another point along the communication channel. However, as described above, in a preferred embodiment encryption is performed as close to the origin of the data as possible or practical to better secure the information.

Continuing with the above example, terminal 114 routes the transaction data for processing by the appropriate institution or institutions. In keeping with the example environment, routing can be accomplished through a gateway 120, or other instrumentality, and onto a transaction processing network 123, which can include one or more entities to perform authorization or settlement functions. As discussed above with reference to FIG. 5, gateway 120 decrypts the portion of the data containing the bank identification number (or other routing data in other embodiments) utilizing the appropriate key. Thus, a decryption module 128B and the appropriate key 12 are illustrated as being a part of, or otherwise associated with gateway 120. Decryption module 122B accesses the appropriate key 12 to perform the appropriate description.

Although only one key is illustrated as accessible by gateway 120, other embodiments may include additional keys that can be accessed by gateway 120 in the service of transactions. For example, a given gateway 120 may service more than one merchant and each merchant may have his or her own set of keys. Carrying this example further, each merchant may have multiple terminals 114 and multiple data capture devices 113. Further, in embodiments where terminal IDs and merchant IDs can be used as unique keys for given terminals and merchants, respectively, a gateway 120 handling these transactions might be provided with multiple keys to enable decryption and routing of the various transaction data from the plurality of sources.

As this example illustrates, regardless of the particular encryption and decryption scenarios implemented, embodiments can exist wherein the gateway 120, transaction processing network 123 and encryption module 132 can each have access to a plurality of keys as might be appropriate for a given configuration.

Continuing with the example discussed above with reference to FIG. 5, having determined appropriate routing, gateway 120 now routes the transaction data to transaction processing network 123 for appropriate action. Because the portion of the account number encrypted with the first key was not decrypted by the gateway, this data remains as encrypted text, and thus a measure of security is maintained with respect to this data. Additionally, in one embodiment, gateway 120 can re-encrypt the bank identification number (or other data that may have been decrypted at gateway 120) to provide additional security during communication to transaction processing network 123. Such re-encryption can be performed using the same or different keys.

At transaction processing network 123, decryption module 122A can retrieve the appropriate key, in this example key 11, to decrypt the remainder of the account number to further process the transaction. Additionally, in embodiments where gateway 120 may re-encrypt the bank identification number and that data is needed to resolve the transaction, transaction processing network 123 can also decrypt that portion of the data to complete the transaction. In such case, transaction processing network 123 may have available to it the appropriate key for such decryption such as in this embodiment where separate keys are used.

As discussed above with respect to gateway 120, transaction processing network 123 may have plurality of keys for scenarios such as where transaction processing network 123 processes transactions for a plurality of merchants, terminals, data capture devices and so on. As discussed above, transaction processing network 123 can be comprised of a single entity to process a transaction or a plurality of entities with some level of interconnection therebetween. Thus, where transaction processing network 123 includes multiple entities, transaction data may be sent from one entity to another within the transaction processing network 123 to appropriately process the transaction. As such, decryption within transaction processing network 123 can be placed with any of these entities as may be appropriate for the given network, configuration or scenario. For example, in one embodiment, where transaction processing network 123 comprises a plurality of entities with secure communications therebetween, it may be desirable to decrypt the information upon entry to the network as the network is a secure network and the clear text communication can be freely shared among the appropriate entities. Alternatively, decryption and re-encryption may take place as appropriate to utilize the data at a given entity, and resecure the data prior to communication to another entity over a communication channel.

In one embodiment, the system can be configured to route transactions directly from terminal 114 to a designated processing entity. For example, the system can be configured such that terminal 114 can route a designated transaction to a payment processor, to an issuing bank, acquiring bank or other designated entity. The routing can be performed through a gateway or other interim server, but the routing path, at least to some extent, can be predetermined. For example, using BIN ranges, or other data identifiers, a routing path for a token or group of tokens can be designated. As a further example, an issuer may designate that transactions for certain of its cards be routed directly to the issuing bank, bypassing payment processing clearing services.

Secure transaction modules can be implemented in a variety of ways to accomplish the desired features and functionality described herein. In one embodiment, the secure transaction module is configured to receive the following information from the gateway to conduct a transaction:

-   -   Gateway Identifier/Key     -   Host Identifier (ID)     -   Merchant ID     -   Terminal Number     -   Track I     -   Track II     -   Track III

These elements are further described in one embodiment. Gateway Key element can be a pre-defined key that is passed by the gateway to the secure transaction module to ensure the service is not being executed outside the gateway's location. The Host Identifier can be a host (gateway) provided internal Transaction ID that is passed back with the response message. It can be used, for example, for the gateway's insurance that the response message is for the transaction that was previously posted to the secure transaction module. The Merchant ID and Terminal ID can be provided by the terminal or generated by the gateway (for example, after the Gateway receives the transaction from the Terminal/POS device). In one embodiment, clear text track data is returned as is, and encrypted data is decrypted as specified and returned.

In one embodiment, the secure transaction module can be configured to send data to a transaction monitoring module. The transaction monitoring module can be configured as a master database for secure transactions. In one embodiment, the database does not contain personal information or credit card data that could be used for identity theft or fraudulent transactions. For example, in one embodiment, the secure transaction module provides the transaction monitoring module with information such as:

-   -   Transaction Date/Time     -   Originator ID (what gateway, processor, etc, created the source         data)     -   Merchant ID (or a hash of the Merchant ID . . . to be         determined)     -   Terminal ID (or a hash of the Terminal ID . . . to be         determined)     -   Auth #     -   Ref #     -   Hash of the Encrypted Track data     -   Hash of the Encrypted PAN     -   Hash of the Decrypted PAN     -   Transaction Amount     -   Transaction Type (Credit Sale, Debit, Void, Refund, Command         Card, etc)     -   *Encrypted Transaction Flag

Note that in one embodiment each transaction is routed through the secure transaction module. In some applications this is desired or required because the gateway can not determine whether a transaction is an encrypted transaction or a clear text transaction and the secure transaction module makes this determination. Therefore in such an embodiment, the secure transaction module can also be capturing “clear text transactions” to determine which merchants are using encryption. For merchants that are using encryption, secure transaction module can determine whether they are using other terminals that are not using encryption. The secure transaction module can also be configured to determine whether an enabled terminal is has its encrypting “turned off” and now is no longer encrypting.

As discussed throughout this document, various embodiments of the invention contemplate providing data encryption functionality as close to, or at the point of, data detection to provide additional security. As discussed with respect to magnetic stripe token environments, such an embodiment can be implemented to provide data encryption at the data detection circuitry or other control logic that is used to ascertain data from the magnetic field patterns detected by the read heads. FIG. 7 is a block diagram illustrating an example configuration for a data capture device such as, for example, data capture device 113, in accordance with one embodiment of the invention. Referring now to FIG. 7, the data capture device in the illustrated example includes data detection control logic 152 that is used to detect data from token 111. Preferably, in one embodiment, data detection control logic 152 is configured to read or otherwise detect the data from token 111, and if appropriate, to convert the data into a usable form.

As such, one embodiment of data detection control logic 152 includes sensor control logic 154 and data conversion control logic 156. In such an embodiment, sensor control logic 154 can be configured to sense, detect or otherwise read the data from the token 111, and to pass electronic signals representing this data to conversion control logic 156. Conversion control logic 156 can be configured to convert, reformat, or otherwise alter the data such that it is compatible with downstream components. For example, consider again the scenario where the example token includes a magnetic stripe with data encoded thereon. In such an embodiment sensor control logic 154 can be implemented utilizing technology such as, for example, magnetic transducers to read the magnetic information encoded into the stripe. Because the output of the magnetic transducer can be an analog signal, or may otherwise have characteristics or properties that make it incompatible with data handling control logic, one embodiment can also include conversion control logic 156 to properly format or convert the data. For example, conversion control logic 156 can include analog to digital converters to convert the detected data to a digital data stream compatible with digital logic circuitry.

In the above example, sensor control logic 154 included magnetic transducers to read magnetic stripe data. As this example illustrates, in other applications, other control logic can be utilized to scan, read, or otherwise extract the data from token 111, depending on the type or format of data at token 111. For example, sensor control logic 154 can include optical sensors to read optical data elements (including, for example, bar codes), RFID transponders, near-field communication devices, or other like transponders to read inductive elements, and others. In one embodiment, data from tokens Ill using formats different from traditional bank card track data can be converted into track data by the data capture device or by the terminal. For example, a data capture device configured to receive a contactless token (e.g., an RFID token) may accept the data, encrypt it, and format it into track data prior to sending to terminal 114. In another embodiment, terminal 114 may accept data in formats other than track data and properly package the data for the downstream processing equipment.

Regardless of whether an embodiment includes sensor control logic 154 and conversion control logic 156, it is preferable that data detection control logic 152 output data in a format that is compatible with downstream circuitry such as, for example, data encryption control logic 160. As discussed with respect to various embodiments herein, a data capture device 113 can be implemented to include the feature to encrypt some or all of the data detected from the token 111. As such, data encryption control logic 160 can be included to encrypt the designated data items to provide a measure of data security. Any of a variety of encryption algorithms can be used to perform the data encryption on some or all of the data items. Additionally, memory or other data storage 164 can be provided to maintain one or more encryption keys that may be used in the encryption process or to store other data or information as may be desired.

In one embodiment, keys can be generated locally at the data capture device 113. In another embodiment, keys can be downloaded or otherwise provided to data capture device 113 for inclusion in storage 164. Therefore, in one embodiment, key generation control logic 166 can be included to provide functionality to generate keys for use in the encryption process. For example, as discussed in greater detail below, command cards and other techniques can be used to prompt the system to generate a new key. As such, key generation control logic 166 can responsively generate the key and provide it to a key storage 164 for use by data encryption control logic 160.

As discussed above, in one embodiment data encryption control logic is sufficiently encapsulated with data detection control logic 152 to provide a measure of security against tampering with the device. Additionally, key storage 164 and key generation algorithm control logic 166 can likewise be encapsulated in the same module to provide a measure of security against the theft of keys or key generation algorithms. Indeed, in one embodiment, any or all of the functionality described with reference to FIG. 7 can be encapsulated with the head. Although not illustrated in FIG. 7, power management functions can also be included and encapsulated as well.

Also illustrated in the example configuration of FIG. 7 is data packaging control logic 170 that takes the encrypted data as well as the clear text data, if any, and packages it into a format that is acceptable to downstream componentry. For example, in one embodiment discussed above, data packaging control logic 170 can reformat encrypted and clear text data for credit card, charge card, debit card and other like tokens into the same format as output by conventional magnetic stripe readers without encryption circuitry. As such, in such an embodiment, electronic data capture device 113 can output transaction data in a format that is recognized by conventional point of sale terminals, point of access terminals, cash registers, and other terminals in use in the industry.

Also illustrated in FIG. 7 is data output control logic 174 that can be included to properly format the data for transmission to the terminal 114 or other downstream appliance. For example, data output control logic 174, may provide appropriate signal conditioning to format the data to proper signal levels for acceptance by receivers at a terminal 114. As a further example, where data capture device 113 is at a location remote from terminal 114, data output control logic 174 can provide the appropriate line drivers (or, as another example, radio transmitters in a wireless environment) to transmit the data across the chosen communication channel to terminal 114. As another example, data output control logic 174 can also be configured to provide the encrypted output data in a format as would be output by a conventional or passive magnetic head.

Also illustrated in FIG. 7 is signature detection control logic 168 that can be included to provide a measure of authentication of the token 111 by detecting a signature associated with the data of that token. Various signature detection algorithms, circuitry, or techniques can be used to determine the signature of the token data which can be compared to a known signature for a given token to determine whether the token is authentic. As one example, in one embodiment signature detection is performed using the SECURESTRIPE® authentication technology available from Semtek Innovative Solutions, Inc., in San Diego, Calif. Other authentication techniques could be used in alternative embodiments.

Signature detection and authentication can be performed locally within electronic data capture device 113 and in other embodiments can be conducted remotely. In still a further embodiment, signature detection occurs in data capture device 113 as the data is detected and signature authentication is performed at a downstream appliance where it may be more practical to maintain a database or other infrastructure to support authentication of a large number of signatures. Signature detection techniques for various types of tokens are well-known to those of skill in the art. As one example of such techniques, U.S. Pat. No. 5,770,846 to Mos, et al., provides an example of determining a token signature.

As illustrated in FIG. 7, the signature detected by signature detection control logic 168 can be forwarded to data packaging control logic 170 for inclusion in the data stream. In one embodiment, the signature can be packaged in the data stream. For example, in one embodiment it is packaged in the otherwise masked data fields of track one to maintain a format that is compatible conventional transaction processing equipment. Although, the encryption method and data placement can be varied to suit particular applications.

In alternative embodiments, signature data may bypass data packaging control logic 170 and sent to terminal 114 or other downstream apparatus in a separate packet or other package from the token data stream. As still a further embodiment, signature data created as a result of signature detection control logic 168 can also be encrypted using one or more encryption keys and forwarded as encrypted data for further processing. In one embodiment, the signature data can be encrypted with the same key as the token data. However, in an alternative embodiment, different keys are used to decrypt the signature data and the token data. In still a further embodiment, the signature can be used as a key to encrypt some or all of the token data.

Although the architecture in FIG. 7 is illustrated as having somewhat of a common bus structure, other architecture and configurations are contemplated. Indeed, after reading this description, it would be apparent to one of ordinary skill in the art how to implement the features and functionality described in these various embodiments using this or alternative architectures.

FIG. 8 is a diagram illustrating an example flow for data encryption at a capture device in accordance with one embodiment of the invention. Particularly, the example illustrated in FIG. 8 provides encryption of selected data from a token 111 and repackaging of the encrypted data with clear text data for transmission to a terminal 114. Referring now to FIG. 8, the data is read from token 111 in read data block 212. For example, in terms of the architecture described with reference to FIG. 7, data detection control logic 152 or other similar mechanism, can read the data from token 111.

In block 214, the appropriate data items from the gathered data are selected for encryption. Data that is not selected for encryption can be passed on for packaging as illustrated by flow arrow 216. In functional block 218, encryption module retrieves one or more keys from a memory or other storage and uses those keys to encrypt the selected data in block 220. In block 222, the encrypted data is packaged with the clear text data for transmission to terminal 114. FIG. 9 is a diagram illustrating another example of data encryption in accordance with another embodiment of the invention. In contrast to the example illustrated in FIG. 8, the example of FIG. 9 illustrates the inclusion of a terminal ID and a merchant ID in the package data stream. In the illustrated embodiment, the terminal ID 224 and merchant ID 226 can be stored locally at the data capture device 113 and selected for inclusion in the transmitted data when appropriate for a given data format. Although not illustrated in FIG. 9, the terminal ID 224 or merchant ID 226 can also be encrypted prior to transmission for transaction processing. Encryption of these items may be accomplished by a common key to both items or by the same key as used to encrypt the token data. Additionally, separate keys can be used to encrypt any or all of these items.

As these examples illustrate, various keys and data items (for example terminal ID 224 and merchant ID 226) can be included with encryption module 132. Or otherwise provided in data capture device 113. In one embodiment, any or all of these data items can be stored into memory associated with the encryption technology at some point in the manufacturing process before the data capture device 113 is distributed to its destination for use. As such, these items can also be embedded and properly encased to prevent or deter tampering and detection thereof.

As discussed elsewhere in this document, certain embodiments can use a terminal ID 224 or a merchant ID 226 as encryption keys or as ways to determine an encryption key. As these examples illustrate, other data items might be used for such purposes as an alternative to terminal ID 224 or merchant ID 226.

As discussed above with reference to FIG. 7, in an embodiment of the invention, a “fingerprint” or signature associated with the token can be used to authenticate the token. For example, with magnetic stripe data, the magnetic transitions or changes in flux polarities or densities in the magnetic data are often disposed on the medium with a certain level of uncertainty. For example, in some cases, the timing of the data may include variations or jitter. In other words, the spacings between the transitions may vary from transition to transition and from card to card. Additionally, because of these variations and the characteristics of the flux patterns, it is difficult to accurately recreate, or copy, magnetic stripe data from an original token to a new token sufficient to maintain the same characteristics. As such, these transition characteristics create a level of uniqueness in the magnetic stripe data.

Other characteristics or variations in token data, card data or other characteristics can also be used to identify a fingerprint or signature for a given token. For example, remanent [sic.] noise technology developed by the Washington University in St. Louis, Mo. might be another technique for identifying token signatures. Other token data systems, including optical data storage, biometrics, RFID tags, and the like might similarly use signature techniques to authenticate the token.

Therefore, in one embodiment, token authentication using a signature can be coupled with encryption of some of all of the token data to provide enhanced security measures for token transactions. For example, in addition to encrypting some or all of the token data to protect its integrity against possible compromise, the token signature can also be detected and checked against a known or verified signature for that token to determine whether the token is an authentic token or whether it may be a fraudulent token such as, for example, a copy of the original token. FIGS. 10 and 11 are diagrams illustrating one example application of this feature in accordance with one embodiment of the invention. Referring now to FIGS. 10 and 11, in a Step 240, token data is received from token 111. For example, in one embodiment, data detection control logic 152, such as that illustrated above in FIG. 7, can be used to obtain, detect, or otherwise read data from token 111. As a further example, where the token is a magnetic stripe card, magnetic read heads and data conversion logic can be used to read and provide a representation of the token data.

In a Step 242, certain of the token data is selected for encryption. As already discussed, some or all of the token data can be selected for encryption depending on a number of factors including, for example, the level of security required, the desirability of having certain of the data in clear text for reporting, authentication, routing, etc., or to otherwise allow conformance with the transaction processing network.

In a Step 244, the data is encrypted. As described with respect to various other embodiments, in this Step an encryption key is obtained and the data encrypted using the selected key. As also discussed, multiple keys can be used to encrypt multiple pieces of data. The encrypted data can be provided for packaging for transmission to terminal 114.

In a Step 246, the token signature is determined. As already discussed, a number of different techniques can be used for signature determination. In the illustrated embodiment, this signature is encrypted in a Step 248, again using an encryption key. In one embodiment, the key used to encrypt the signature can be different from the key used to encrypt the token data. In a Step 252, the encrypted token data is packaged with the encrypted signature to allow these items to be provided for transaction processing.

In a Step 254, the packaged data is sent for processing. For example, in terms of the example environment the packaged data can be sent to a transaction processing network to authorize the current transaction. Further with this example, the package data can be routed through a terminal 114 in furtherance of completing the transaction.

In a Step 256, the packaged data is received by an appropriate transaction processing entity which can decrypt the signature in a Step 258, check the authenticity of the signature in a Step 250, and make a determination as to whether the token 111 is valid based on the authenticity of the signature in a Step 262. If valid, the transaction can be forwarded for further processing based on the token data itself as illustrated by Step 264. On the other hand, if the signature is not valid the transaction can be disapproved as illustrated by Step 266.

Note that it is not necessary for signature data to be packaged with token data for transmission in a single data package to the various processing entities. In an alternative embodiment, the signature data can be separately transmitted for authentication and an indication of the authentication status can be provided to the appropriate transaction processing entity for final authorization. Additionally, as illustrated by flow line 250, clear text token data that is not encrypted can also be packaged for transmission with the transaction data. As also discussed with respect to other embodiments, other data such as a terminal ID, merchant ID, and so on, can be sent to facilitate transaction processing, either packaged with the transaction data or separately.

In one embodiment, signature decryption and authentication can take place in the same entity and even the same appliance that is used to authorize the transaction. Alternatively, signature decryption and authentication can take place in a separate appliance and even at a separate point in the network from the authorizing entity. Also note that in one embodiment, authentication of the signature can be a positive or yes/no authentication. Alternatively, authentication of a signature can be provided as a weighting factor, figure of merit or other score that can be used to provide a ranking of the authenticity of the signature. Such embodiments may be useful in applications where, for example, signature is determined based on magnetic stripe data, wherein absolute precision in the detection and timing of flux transmissions can be difficult to obtain. As such, for a given card, it's own signature may vary within a certain degree from one read operation to the next. Therefore, an authenticity score can be used to show the level of confidence with which the signature was authenticated. Thresholds or other techniques can be used to identify for example a cut off range below which a signature will be determined to not be authenticated.

In one embodiment, a signature decryption appliance or module can be located, for example, with Gateway 120 so as to allow signature authentication at the gateway prior to routing the transaction to the transaction processing network for authorization. Such an embodiment can avoid otherwise unnecessary routing and handling by transaction processing network 123. Additionally, where the gateway is configured to decrypt some or all of the encrypted token data, this functionality can be kept separate or bundled with the signature authentication functionality. If the signature is not approved or the rating is below a certain threshold, notification can be returned to terminal 114 to disapprove the transaction without further processing. In such embodiments, re-swipes may be permitted in the event that the failure to authenticate is a result of faulty read equipment or a poor swipe. In yet another embodiment, the signature data can be sent in a separate transaction prior to initiating transmission of the account data for authorization.

Because signature verifications can be accomplished in a single or separate location with a signature database, signature authentication can be shared from among multiple institutions while providing a level of data security in the account information because the shared facility does not have access to the encryption keys used to encrypt the account information.

In one embodiment, the gateway 120 can be configured to receive transaction requests from multiple devices employing encryption modules. The transaction data can be configured to include one or more components. In one embodiment, the transaction data includes two components: token data and control data. In one embodiment, these can be encrypted using different keys. As such, in this embodiment, the gateway can be configured to not have control data keys, but not the keys used to decrypt the token data, therefore providing a measure of security in that data. Whereas providing the gateway with keys to decrypt the control block to detect information contained therein that may be useful for the particular application and transaction. For example, in one embodiment, the card signature or other token signature can be included in the control block that can be decrypted by the gateway.

In one embodiment, the results of the signature authentication along with other control information can be encrypted with a transaction process server's private key to which the transaction is being sent and the request forwarded. As such, the gateway can perform signature verification and the transaction process server can determine whether to accept the transaction or not based on the signature, or signature rating, along with any other information the transaction process server has access to.

Additionally, the signature can be sent with an encrypted or hashed account data to the signature verification module. The system can be configured to use encrypted or hashed PAN (or other token data item) to index the signatures for comparison. As such, in one embodiment, the signature database can be configured to hold encrypted data rather than sensitive clear text information. With a secure database, in one embodiment, the database might be made accessible to multiple entities, allowing a clearing place for authentication while maintaining a measure of security in the token data. Thus, a signature module (for example, as part of a secure transaction module or otherwise) can be configured to perform signature authentication, and transactions routed thereto for authentication. The signature database can be maintained for multiple entities and updated from multiple sources.

In one embodiment, the gateway with one or more appliances or modules to decrypt (and, in some embodiments re-encrypt) routing information, signature information, token data, or other information can be used to provide a standardized interface to multiple transaction processing entities. The gateway can also be configured to provide a standardized interface to terminals 114. Additionally, gateways can be configured to provide a plurality of interfaces to terminals 114 for transaction processing entities 123 as may be appropriate to facilitate flexibility in communications among these entities. Thus, gateways can be used not only to provide interim decryption, re-encryption and routing but also to provide a way to conform interfaces among various entities within a network.

In one embodiment, the invention can be configured so as to operate with tokens that present data in clear text or encrypted form. For example, in one embodiment, tokens can include data that is encrypted on the token itself. As a further example, token data or portions thereof can be encrypted before the data is embodied on the token. As such, a level of security can be provided for the underlying token data even if the token is lost, stolen, copied, or otherwise compromised. For example, providing encrypted data on the token (at manufacture or otherwise) can provide the advantage of protecting data from those who use card readers for skimming data or otherwise reading and storing the data for improper purposes.

To consider yet a further example consider again a scenario where token 111 is a bank card having a magnetic stripe. A bank patron who loses his or her card may have sensitive information such as his or her name or account number compromised. Additionally, in some scenarios, fraud perpetrators use magnetic stripe readers to copy the data from cards for fraudulent purposes. Encrypting some or all of this date before writing the magnetic stripe allows a certain measure of security in this data.

In such embodiments, it may be useful or desirable for the entity or entities involved with transaction processing, including the paying institution, to have the ability to decrypt this data that was originally encrypted. Such decryption capability will allow the transaction processing entity to recover the original information (for example the account information) to complete the transaction. Additionally, in some embodiments, terminal 113 or other local device may have the ability to decrypt at least part of the data (for example, the expiration date, last four digits of account number, or user name) to provide the ability for an operator to provide local authentication. In other embodiments, these data items may be left in clear text on the card (and not encrypted by encryption module) to allow this authentication.

In embodiments where an encryption module is used with a data capture device or elsewhere in the transaction chain, such encrypted data would be encrypted again by encryption module 132. As such, it may be desirable in some applications to provide two layers of decryption to not only decrypt the data provided by encryption module 132 but also the decrypt the original data as encrypted on the token. Such original token encryption can be accomplished, for example, by encrypting the data prior to writing it to the token or via encryption technologies embedded with the token. For example, smart card or chip card tokens can be provided that include functionality to perform encryption prior to making the data available to a data capture device.

In one embodiment, sufficient information can be left in clear text on token 111 to allow operation of conventional point of sale, point of access, or other terminal equipment. In an alternative embodiment, all the information on the token is encrypted data.

In one embodiment, when the original token data is encrypted, the encryption key can be stored and provided to the appropriate processing entities such that the original data can be decrypted. Additionally, a hash code can be generated. The hash code can be used to create a digital fingerprint or signature from the data. Hash codes can use substitution transposition and other techniques to create the signature, which is often referred to as a hash value. Thus, in one embodiment, the hash code can be used as the encryption key that is used to encrypt the original data. Additionally, a hash code can be used as a fingerprint to authenticate the original data such that upon subsequent decryption, the hash code can be used at the processing entity to validate the recovered data. Thus, in such an embodiment, the hash function can be provided to the processing entity such that the processing entity can rehash the decrypted data to arrive at the correct hash code. In a preferred embodiment, the hash code or hash function is a one-way operation minimizing the likelihood that a would-be hacker would be able to calculate particular data input that results in the desired hash value. In such embodiments, it can thus be very difficult to forge the hash value.

FIG. 12 is an operational flow diagram illustrating an example process for handling token data that is encrypted on the token in accordance with one embodiment of the invention. Referring now to FIG. 12, in a step 442, the encrypted data is read from the token. That is, in one embodiment, a data capture device such as, for example, data capture device 113, can be used to read the data from the token. This example embodiment, applies data encryption to some or all of the token data that is read in step 442 despite the fact that some or all of this data may already be itself encrypted. Thus, in a step 444, some or all of the token data, including the encrypted token data, is encrypted. This can be accomplished, for example, using an encryption module 132 or other like device. As discussed with reference to other embodiments, the data output from the data capture device can be packaged into formats appropriate for the processing network (including conventional terminals) and, in step 446, the packaged data sent for processing.

In a step 448, the encrypted data is decrypted. For example, in this step, the data encrypted by encryption module 132 is decrypted to once again arrive at the originally encrypted token data that was read in step 442 (along with any clear text data that may have been on the token and read in step 442). Having the original encrypted token data, this original data can now be decrypted to arrive at the actual account number or other actual token data in clear text form. Thus, in one embodiment, the key used to originally encrypt the token data is now used to decrypt this data to arrive at the original information. As stated above, in one embodiment the key that was used for this encryption is distributed or otherwise provided to the appropriate transaction processor such that the decryption at that location can take place. In embodiments where a hash code is generated from the encrypted data, in a step 450 the hash code can be regenerated using the same hash function. The generated hash code can then be used in a step 452 to look up a decryption key that is used to decrypt the data in step 454.

In one or more embodiments as previously discussed, a terminal ID, merchant ID, or other identifying string can be used to encrypt some or all of the data that is encrypted for the transaction. As briefly mentioned, using an identifiable string or encryption key can facilitate identification of the sources of suspected fraudulent transactions. FIG. 13 is an operational flow diagram illustrating an example process for detecting a source of suspected fraudulent transactions in accordance with one embodiment of the invention. To facilitate description of this example process, it is described in terms of encryption using a terminal ID as the encryption key. However, after reading this description, it will become apparent to one of ordinary skill in the art how to implement this and other embodiments using alternative forms of encryption keys.

Referring now to FIG. 13, in a step 60 token data that has been encrypted (for example, by an encryption module 132 in a data capture device 113) is received by a transaction processing entity. For example, it can be received by gateway 120, a designated entity in a transaction processing network 123 or other transaction processor. This is the entity that is designated as performing the decryption to recover the card data. Remember, in this example scenario, fraudulent activity is suspected. Suspicion may arise based on, for example, the failure of the designated key to properly decrypt the data. Thus, to locate the source of the suspected fraudulent data, an encryption key is retrieved from the database in a step 64, the data decrypted in a step 66, and in step 68 the data is checked for validity. Validity checks can be used to determine, for example, whether a valid account number is decrypted, whether the decrypted information matches other records, and other validity checks that may be used.

If the retrieved key does not result in a valid decryption, another key is retrieved and the process continues. This process is repeated until a valid decryption is detected at step 68. Once a valid decryption is detected, in a step 70 the key that resulted in the correct detection is identified in step 70 and that key is used to locate the source of the data in step 72. For example, because the data was encrypted with the terminal ID, location of the correct key can be used to point back to the terminal that read the data and performed the encryption.

In another embodiment of the invention, ancillary information such as, for example, timing information or location information can be included with transaction data to tag the transaction data with date, time, or location information. Such information can be retrieved or obtained by, for example, the terminal 113, or other control logic that may be embedded in or included with data capture device 113. For example, real time clocks can be included with the transaction processing equipment to appropriately tag transaction data with date and time information.

Likewise, global positioning system (GPS) or other position determination technology can be used to identify a location and cause a location code to be embedded in the data stream. Additionally, the location information can be added to the encryption mask generation because, in one embodiment the decryption service knows the location of the terminal. Therefore, if a terminal is stolen, or sold and moved to another location, the location information will be invalid, making the terminal unusable. Similarly, position information can be hard coded or otherwise embedded in the devices to enable it to be packaged with the transaction data. This could be useful where portable devices such as cell phones, PDAs, smart phones, or other portable terminals are used to conduct transaction. Additional examples of portable terminals may include portable check-out devices used at car rental facilities, portable cash registers in large retail outlets, portable package delivery and tracking devices such as the DIAD used by UPS drivers, just to name a few. Indeed, after reading this description, it will be apparent to one of ordinary skill in the art how these and any of a number of other terminals can be used in this and other embodiments.

Locational information can be useful in embodiments where, for example, the point of sale, point of access or other terminal is a mobile terminal. In such embodiments, this information can be utilized to verify where the transaction occurred. Additionally, time stamp information can be likewise used to verify when the transaction took place. As a further embodiment, time stamping can also be used to compare data across multiple transactions to determine whether potentially fraudulent activities are occurring. For example, where token data has been copied and used to make multiple transactions, the occurrence of these multiple transactions with the same time stamp information, or even the same location information, may identify potentially fraudulent activities. Additionally, the time stamp information in a transaction can be compared with current date and time information in the transaction processing server and out-of-date transactions rejected or other questioned. In such circumstances, a new card swipe can be requested.

FIG. 14 is an operational flow diagram illustrating a process for using time stamp information to detect potentially fraudulent activities in accordance with one embodiment of the invention. Referring now to FIG. 14, in a step 462, timing information is obtained, for example, from a clock or other data source. In a step 468, the data is tagged with the epoch information and sent for the transaction to be processed. In one embodiment, the time stamp data can also be encrypted.

At a designated point in the transaction processing network, the transaction data is received for processing as illustrated by a step 312. In a step 314, the epoch information is checked to determine whether it is a valid time stamp. For example, the information can be checked against previous transactions to detect recurrence of a given time stamp. Additionally, the information can be checked against a real-time clock to determine whether the transaction compares favorably to a contemporaneous clock in the processing system. For example, to check to see if the transaction data has arrived within an reasonable timeframe of it's time stamp considering network latencies. If invalid, in a step 316 a re-swipe may be required and the check performed again. If valid, the transaction can be forwarded for further processing as illustrated by a step 318.

In the event of an invalid time stamp check, the transaction can be disapproved in a step 320 and a fraud alert triggered in a step 322. Although not illustrated, a designated number of re-swipes (including zero) can be permitted before final disapproval or fraud alert triggering.

In one embodiment, if the re-swipe results in a time stamp that is delayed by an amount somewhat equal to the duration between swipes, this could indicate a synchronization issue with the time stamp clock or the server clock, or abnormal network delays. This can provide a metric to determine whether to allow the transaction and could also trigger an investigation into the source of the synchronization issue or delay.

In addition to time stamps or location information, counters can be maintained to track the number of uses of equipment in the processing chain such as, for example, electronic data capture devices 113 and terminals 114. Thus, count values during a transaction can be compared with an expected count value based on a previous transaction to check for potentially fraudulent activity. This can help to test for reused transaction data that had been previously fraudulently recorded. That is, in one embodiment the real time count information might be embedded in the data stream by either the data capture device or the terminal (or count values for both) and the count values in the transaction to verify to ensure proper incremental counts.

A counter can also be used to update or otherwise alter encryption keys that are used for encrypting the information. That is, rolling encryption keys or other like changes can be made based on date and time information, location information or a counter. For example, incrementing the counter with each transaction may cause a predetermined or determinable change to the encryption key, and, at the transaction processing server, a similar change is made based on the counter to yield the appropriate decryption key. This rolling or updating key implementation can provide an additional measure of security. For example, the keys will change and thus be harder to duplicate and the output of data capture device will change each time the token data is entered. Thus, in the bank card example, multiple swipes of a bank card will result in different data output for each subsequent swipe of the same card because the encryption key has changed each time. As a result, this will facilitate fraud detection if data is stolen from a terminal or other server and attempted to be reused to make fraudulent or duplicate transactions. In other embodiments the keys might be designated to change after a given number of entries or after a predetermined period of time.

As discussed in the above example with reference to FIGS. 5 and 6, the present invention can be implemented so as to include a serial number or other identifier of the data capture device or terminal, along with the transaction data to allow the correct keys to be retrieved for subsequent decryption. Thus, where some of all of the data is encrypted using a terminal ID, that terminal ID (or a code allowing determination of the terminal ID) is included in the data stream to facilitate identification of the appropriate decryption key, or otherwise sent to the decrypting entity. In one embodiment, the terminal identification number can be a serial number or other identification string associated with a data capture device. Particularly, in one embodiment, this identification number can be unique to a given data capture device such that additional functionality can be provided as discussed below. For example, as will be further discussed, the serial number or unique identifier can be used to track the movement and usage of the electronic data capture devices. For example, if an electronic data capture device is stolen, misused, or used in a fraudulent fashion, the terminal ID, serial number or other information included with the transaction data can be used to detect the unauthorized use. As another example, received encrypted data can be decrypted against several keys to find the key that correctly decrypts the data. When that key is identified, the terminal ID (which is either the key or used to get the key in this example) can be determined. Now, with a known terminal ID as a result of decryption, the source of suspected fraudulent activity can be determined.

In one embodiment, the terminal ID can be a serial number or other string unique to an electronic data capture device. In another embodiment, the terminal ID can be unique to a point of sale, point of access or other terminal to which an electronic data device is connected or with which an electronic data capture device is integrated. Where a terminal may be in communicative contact with a plurality of data capture devices, the assignment of a terminal ID or a plurality of IDs to uniquely identify each data capture device individually, a subset of data capture devices, or simply the terminal with which one or more data capture devices is associated can be chosen based on desired implementation goals.

Discussed above are various embodiments where token data can be encrypted, in whole or in part, using one or more keys, to provide a measure of security for various token transactions. Examples described above include applications where the token 111 is a bank card such as, for example, a credit card, charge card, or debit card. With transactions such as these, and particularly in the case of debit or ATM cards, personal identification numbers, or PINs are often used to authenticate (or verify that the cardholder is an authorized cardholder) for the transaction.

To provide an additional measure of security for transactions using PIN identification codes, other user-entered or user-supplied data or other additional data in general, it may be desirable that such ancillary information also be encrypted. As such, in accordance with one embodiment of the invention, such additional data (for example some or all of the PIN data) is encrypted. One such embodiment is now described in terms of the example application wherein the token 111 is an ATM or debit card, and the additional data to be encrypted is the user's PIN code. Generally speaking, in accordance with one embodiment of the invention, the PIN code can be received by a PIN pad or other like data entry device, the PIN code encrypted, and included (packaged or otherwise) with the transaction data.

FIG. 15 is an operational flow diagram illustrating an example process for encrypting some or all of the additional data, such as PIN data, in accordance with one embodiment of the invention. FIG. 16 is an operational flow diagram illustrating an example process for decrypting additional information such as, for example, PIN data, in accordance with one embodiment of the invention. FIG. 17 is a block diagram illustrating an example application for PIN encryption in accordance with one embodiment of the invention. Referring now to FIGS. 15, 16 and 17, in a step 180, the token data is read. For example, in terms of the example application wherein token 111 is a debit card, a data capture device 113 such as a magnetic stripe reader can be used to read the magnetic stripe data from the debit card. In one embodiment, data capture device 113 can include an encryption module 132 to provide encryption of some or all of the token data. Such encryption can, for example, be performed in accordance with the various embodiments discussed in this document. The step of encrypting token data is illustrated by step 182 in FIG. 15.

For the example of a debit card transaction, in conducting the transaction, the cardholder enters his or her PIN 141. This is typically accomplished using a PIN pad keypad 140 or other device that allows the user to enter the additional information (in this case, a PIN). Thus, in a step 184, the entered PIN is accepted by PIN pad 140.

In a step 186, part or all of the entered PIN is encrypted using encryption techniques. In one embodiment a module such as, for example, an encryption module 132, is provided with PIN pad 140 to perform the PIN encryption. In one embodiment, the encryption can be performed using an encryption key stored in memory or generated based on any number of parameters such as those discussed above with token data encryption. In another embodiment, PIN data can be encrypted using some or all of the token data that is read from token 111. For example, in one embodiment, the account number, user name, or other data field or fields from token 111 can be passed to encryption module 132B to perform the PIN data encryption as illustrated by flow arrow 143. It is noted, however, that providing clear text account or other token information across a communication channel to a PIN pad 140 may provide an opportunity for such information to be compromised. As such, in a preferred embodiment, this information is encrypted and the illustrated example uses the encrypted PAN to encrypt the PIN.

Therefore, in a preferred embodiment, encrypted token information is passed to encryption module 132B to serve as a key to encrypt the PIN data. More particularly in one embodiment, the encrypted portion of token 111 is used as the encryption key for encryption module 132B. As such, the PIN data in this example embodiment is encrypted with the encrypted portion of the PAN. For ease of discussion, the remainder of the description of PIN encryption is discussed in terms of this example embodiment wherein the PIN is encrypted using the encrypted PAN (or partially encrypted PAN) as the encryption key.

The encrypted PIN data can be passed back to encryption module 132 for packaging into secure data stream 135, or passed to terminal 114 for subsequent transmittal for transaction processing. These alternatives are illustrated by flow arrows 141. Although illustrated as separate blocks in FIG. 17, data capture device 113 and PIN pad 140 can be integrated as a single device or in a single housing. However, in some embodiments, and in numerous conventional existing applications with which this technology can be implemented, PIN pad 140 may be physically separate from data capture device 113. As such, passing encrypted data from data capture device to PIN pad 140 via flow line 143, provides a measure of security that may otherwise not be present were the PIN data to be encrypted with a clear text account code or other information. Additionally, as noted above, encrypting the token data as close to the source as possible or practical provides an additional measure of security, and not using a clear text PAN can help protect the PAN from compromise.

In a step 188, a transaction is sent for processing. In applications where a terminal 114 is involved such as, for example, a point of sale or point of access terminal, transactions can be routed through terminal and sent to transaction processing network 123 as illustrated by flow arrow 137. As discussed above in token encryption embodiments where a PIN pad 140 was not used, the encrypted token data and PIN data can be repackaged into a desired format as may be compatible with downstream processing devices. For example, in one embodiment, the encrypted token and PIN data are repackaged into the same format used by conventional point of sale or point of access equipment to provide compatibility with conventional processing networks.

With continuing reference to FIGS. 16 and 17, in some embodiments, a gateway 120 can be included to facilitate routing of the transaction from the merchant or other point of sale or point of access, to the appropriate entity or entities in transaction processing network 123. As such, the example illustrated in FIG. 16 includes a gateway 120 to provide such routing functionality. Additionally, in the example illustrated in FIG. 17, the various decryption operations are illustrated as occurring at or within gateway 120 (e.g., at the gateway data center). As discussed above in other embodiments, this decryption need not occur at a gateway 120 (an indeed certain applications may not even include a gateway 120), but instead the decryption can occur at the appropriate transaction processing entity or elsewhere along the channel as may be appropriate given security considerations. In one embodiment, decryption at the gateway 120 can allow the gateway to decipher the token data (and, in some cases, PIN data) for routing and other purposes. In fact, decryption at the gateway can serve to return the encrypted data to clear text form for processing by the network 123, thus providing another mechanism to achieve compatibility with conventional processing servers.

In keeping with the current example, in a step 24 gateway 120 receives the transaction data 137 for processing. In one embodiment, gateway 120 can be used to decrypt, or arrange the decryption of, the PIN to facilitate transaction processing. In this embodiment, in one application, gateway 120 can route the PIN to a secure transaction module 145 for decryption. In an alternative application, secure transaction module 145 functionality can be included within or as a part of gateway 120.

In one embodiment, secure transaction module 145 can include a decryption module 144 to decrypt data items including, for example, some or all of the PIN, the PAN, or other data as may have been encrypted. Secure transaction module 145 can also be implemented to include the functionality to encrypt (or re-encrypt) data as well. As such, an encryption module 146 can be included to provide additional data security for subsequent routing to transaction processing network 123. Although not illustrated, secure transaction module 145 can include access to a storage device for key storage and the like.

Continuing with FIG. 16, in a step 26 decryption module 144A is used to decrypt the PAN or portion thereof that was encrypted by data capture device 113. In a step 28, the encrypted PAN (encrypted by encryption module 132A at data capture device 113) is used to decrypt the encrypted PIN. This step can be included in embodiments where the encrypted PAN is used to encrypt the PIN as discussed above.

In embodiments where it is desirable to transmit the PIN in encrypted form to transaction processing network 123, gateway 120 (or in the case of the illustrated example, more particularly, secure transaction module 145) re-encrypts the PIN in step 30. This re-encryption can be performed with the clear text PAN that was arrived at by decryption in step 26.

Thus, the gateway now has the encrypted PAN, as encrypted by encryption module 132A, and a re-encrypted PIN encrypted with the clear text PAN. In a step 32, the encrypted PAN and re-encrypted PIN are routed to transaction processing network 123 for final processing. The processing entity in transaction processing network 123 decrypts the PAN and then using a decrypted PAN to decrypt the PIN to perform the final authorization. Upon authorization, confirmation thereof can be routed back to terminal 114.

In the example described above, the PIN data was encrypted using encrypted PAN information. However, because, in that example application, transaction processing network 123 is expecting the receive PIN information encrypted by the clear text PAN, the example illustrated in FIG. 16 performs a decryption of the encrypted PIN using the encrypted PAN to get the clear text PIN then re-encrypts the clear text PIN with the clear text PAN so that it is encrypted with a key as expected by transaction processing network 123. However, to arrive at the clear text PAN used to decrypt the PIN, the encrypted PAN is also decrypted at the gateway and then re-encrypted for transmission. These additional steps can be included to allow the encrypted PAN to be used for PIN encryption, thus providing the additional measure of security to the PAN data during the PIN encryption process. As this example illustrates, other data can be used to encrypt the PIN and the PAN-encrypted PIN recreated at the gateway as well.

As stated above, these decryption and re-encryption steps can be performed at other points along the communication channel. As would be apparent to one of ordinary skill in the art after reading this description, the various decryption/encryption steps can be performed at points along the network as would be appropriate for a given application. Also note that in another embodiment, re-encryption need not be performed by gateway 120. This alternative might be useful, for example, in applications where the communications between gateway 120 and transaction processing network 123 are across secure communication channels. In other words, gateway 120, in some applications may be part of a secure communication network, or even included as a part of transaction processing network 123.

In one embodiment, a web portal can also be provided for management of terminals, data capture devices (which can be included in terminals) gateways, secure transaction modules and other entities in the secure transaction processing chain. The portal may also be used to provide an authorized user the ability to toggle encryption on or off at one or more terminals, change keys, update encryption information and so on. The portal may also be used to display data and other statistics about terminals, transactions, cards and card usage, and so on. For example, in one embodiment a web portal is provided to allow merchants to control their terminals as an alternative to command tokens.

Dashboard displays can be included with the portal to give merchants an overview of the status of or statistics of their terminals including, for example, security, integrity, encryption status, number of swipes, number of rejected cards, and so on. As another example, an issuing bank portal may be provided to give the issuing bank the ability to view statistics or other information on its cards and transactions with its cards, or to a merchant to enable or disable encryption for its cards (to request a merchant to do so, or to send a command to one or more terminals to toggle encryption on or off). Terminals can also be implemented to allow multiple logins per account with security rights per user; dashboard displays to visually shows each terminal with status information; provide the ability to turn off a terminal in real-time, which in one embodiment can be accomplished by rejecting any transaction originating from a serial number; and the ability to set thresholds, for example, for Analytics Ratings by terminal/serial number, geographic regions, etc.

In another embodiment, the web portal can be used to allow a user to generate command tokens or to update command tokens. For example, in one embodiment, command cards can be ordered using the portal and shipped to the merchant or other user. In another example, a printer or other token writing device can be provided to allow the merchant, or other user to create his or her own tokens on site. Additionally, techniques can be provided to allow existing command cards to be updated using the web portal.

In one embodiment, the returned information for a transaction, such as, for example, a returned authorization, can signal the completion of a transaction. In another embodiment, the authorization can simply be approval for the transaction and a subsequent transaction is used to actually consummate the transaction, or to otherwise complete or settle the accounts. For example, in terms of the bank card examples, the initial communication and authorization received may simply be an approval for the transaction and a subsequent settlement transaction typically takes place such that the funds can be allocated appropriate to the transaction. In some conventional transaction processing networks, a batch settlement file is maintained at the terminal 114 or other merchant location where multiple transactions accumulated and are saved in a file. For example, a day's worth of transactions may be saved in a batch settlement file. For settlement, the batch settlement file can be transmitted to the transaction processing network 123 for account settlement.

Because merchants may accept bankcards from a variety of different financial institutions, the batch settlement file may contain transaction information to be processed by more than one transaction processor. For example, a merchant may accept cards from various entities such as VISA, MASTERCARD, AMERICAN EXPRESS, and so on. Additionally, some or all of the token information for some or all of the tokens may have been encrypted by electronic data capture device or other device when the transaction occurred. As such, information in the batch settlement file may include encrypted information such as encrypted account information (in whole or in part) or other encrypted information.

FIG. 18 is a diagram generally illustrating such a batch settlement process in accordance with one embodiment of the invention. As discussed, a transaction is conducted 190 and sent to transaction processing network 123 for authorization 192. In one embodiment, some or all of the token data can be stored by terminal 193 (for example, in batch settlement file 194) while it awaits authorization from the transaction processor. When the authorization is returned from the transaction processor, the settlement file 194 can be updated to include that transaction as an authorized transaction. At a predetermined time, the file containing the authorized transactions can be sent to a transaction processor for batch processing 192. In batch processing, the transactions can be processed and the accounts settled accordingly.

In conventional processing networks, such a batch settlement technique can be performed in a relatively straight forward fashion where all of the information is in clear text form. For example, with clear text routing and account information, transaction in the batch settlement file can be routed relatively easily to the appropriate transaction processors, the account information processed and the settlement consummated. However, where some or all of the token information is encrypted, this may require certain considerations for handling settlement data to ensure that the appropriate decryption can take place and the appropriate routing can take place across a number of different transactions with different merchants and different institutions.

For example, consider one or more embodiments discussed above where PAN or other data is encrypted using a terminal ID or a merchant ID. In such embodiments, the encrypted token information for a given token may vary from merchant to merchant or even from counter to counter within a given merchant. Additionally, where sequence numbers or other rolling key techniques are implemented, token information can vary from transaction to transaction, even for the same token used at the same terminal. As such, this could present a challenge when processing the data from that token for settlement. Therefore, in one embodiment, a decryption service can be included to provide decryption for settlement transactions between merchants (or other transacting entities) and institutions or other transaction processors.

Before describing such a decryption technique, one possible encryption technique is described with reference to FIG. 19. FIG. 19 is a diagram illustrating one possible encryption technique in accordance with one embodiment of the invention. Referring now to FIG. 19, the PAN portion of token data is illustrated as having BIN data 270, a portion of account data 271, and the last four digits of the account number 272. In this example, the six middle digits of the account number 271 are encrypted using a key 275 via encryption module 274 to create an encrypted six account digits 276. As discussed above, in one embodiment key 275 can be, for example, a merchant ID. The encrypted account information 271′ can be reinserted with the BIN 270 and last four 272 to create a new PAN 279 that includes part of its data in encrypted form. Thus, in this example, a card swipe of the same card at different merchants would provide a different transaction data 279 for each transaction. Likewise, if a counter or other rolling technique is used the account information can change even at the same merchant.

FIG. 20 is an operational flow diagram illustrating a process for processing batch settlements where some or all of the account data has been encrypted, in accordance with one embodiment of the invention. The example of FIG. 20 is described in terms of the above example illustrated in FIG. 19 where a portion of the PAN is encrypted utilizing the merchant ID as the key 275 and repackaged into an encrypted PAN 279, wherein, in this example, the encrypted PAN 279 includes a concatenation of clear text data and encrypted data. Referring now to FIG. 20, in a step 278 the batch data is received. In one embodiment, this is received as a batch settlement file that can be a text or other like file and can include a plurality of records for a plurality of transactions.

As discussed, in one embodiment, and indeed in the preferred embodiment, the decryption described herein can be performed at a gateway or other server, and the gateway can then communicate the appropriate information to the designated transaction processor. Thus, the gateway can include the appropriate decryption and encryption modules or otherwise have access (preferably secure access) thereto. More particularly, in one embodiment, the gateway can send the batch settlement file to a secure transaction processor for processing.

In a step 330, the process checks to determine whether a given data record in the batch settlement file contains encrypted data. If not, the process is completed and the clear text data can be forwarded to the appropriate transaction processor for settlement. In one embodiment, a flag can be set in the record, or some other indication can be made to indicate whether the data is encrypted or in clear text. This can be useful, for example, in applications where an interim server (for example a gateway), does not need to know whether a received account number is a valid number (receipt of an apparently invalid number could indicate the presence of encryption).

To illustrate by way of example, in one embodiment, to avoid adding additional characters to the transaction data stream and thereby facilitating compatibility with conventional processing systems, one technique for flagging the encryption status of a data package is to increment the expiration date by a large enough number to unambiguously indicate the presence of encryption. For example, in one embodiment, the expiration date is incremented by 12 years. Thus, in such embodiments, expiration dates can serve as a flag and can be checked to determine the encryption status. One advantage of incrementing the year by 12 (or some other value) is that the original expiration date can easily be recovered by reversing the operation. This scenario is suitable for current bankcard transactions, as such cards typically have expiration dates that are two to five years in the future. Thus, when an expiration date occurs that is 12 or more years in the future, the system can determine with a fairly high degree of certainty whether the data is encrypted. As another example, in one embodiment the expiration date or a part thereof can be substituted with a flag string such as, for example, all zeroes or all nines. As another example, a separate field can be added to the record to indicate whether or not some or all of the data is encrypted.

Thus, for encrypted data sets, in a step 332 the appropriate key is called from a data store. For example, in the example embodiment illustrated in FIG. 19, the merchant ID or key associated with the merchant ID is called to decrypt the transaction data. In one embodiment, the batch settlement file can include an indication of the merchant from which the file was sent thus informing the decryption engine which key to use. For example, header or other file information included in the batch settlement file can indicate the merchant ID or other information that may be useful in generating, retrieving or otherwise determining the appropriate keys for decryption. Likewise, each record can also be appended to include information (for example, sequence information) for generating, retrieving or otherwise determining keys associated with the particular transaction. Also, because different institutions may have different encryption standards or requirements, the encryption process may vary based on information such as, for example, a BIN range, or other factors. In such applications, the decryption process (whether for batch settlement or otherwise) can likewise be tailored to enable appropriate decryption. Thus, in one embodiment, the BIN range (or other factors) can be used to retrieve the appropriate key(s) to be applied to decrypt the appropriate data item(s).

In a step 334, the data is decrypted using the appropriately retrieved key(s) and clear text information is returned in step 336. Additionally, in embodiments where the expiration date has been changed to indicate encryption, the expiration date can be returned to its original date and reinserted into the data.

In embodiments where this cash settlement decryption occurs at a gateway or other interim server, the server can now forward the transaction to the transaction processor where it is processed in step 337. Where this step occurs at the transaction processor, the data may be used by the transaction processor upon decryption. In one embodiment, the transactions can be separated from the overall batch file and sent individually or in subsets to their respective transactions processors. In another embodiment, the batch file can be reconstructed with the clear text information and sent for processing, for example, to a clearing house or other central processing site, or to another routing device to route transactions to their appropriate processors.

In embodiments where a gateway or other interim server is utilized to perform the batch settlement decryption, re-encryption of the data can be performed prior to sending the data onto the transaction processor for final settlement. For example, particular key regimes can be instituted between the gateway 120 and appropriate transaction processing entities to ensure that the data can be encrypted (for example, by a secure transaction module 145 associated with the server) for transmission by the gateway and appropriately decrypted by the transaction processing entity. As one example, a secure transaction module 145 may maintain a set of keys with the gateway and those keys can be used to encrypt transactions that are to be forwarded to that given entity. After reading this description, it will be apparent to one or ordinary skill in the art how to use other encryption techniques between a gateway 120 or other interim server and the transaction processing entity.

Performing settlement file decryption at an intermediary entity or entities such as a gateway 120 or other server can provide the advantage of allowing the interim server to accept data from multiple diverse sources and, in embodiments where encrypted data may change from transaction to transaction, to accept data from multiple transactions. Thus, in such an embodiment, the server can act as a data formatter to put the data from diverse sources in diverse forms into a common format for a given transaction processor.

As discussed above, a variety of different encryption techniques can be utilized to provide encryption of some or all of the token data 111, pin data, or other data. As just a few examples, hash functions, substitution tables, electronic code book encryption, modulo additions can be used to encrypt the data. Indeed, as would be apparent to one of ordinary skill in the art after reading this description, any of a variety of encryption techniques can be utilized. Now described are one or more techniques that can be used to perform encryption in accordance with various embodiments of the invention.

FIG. 21 is a diagram illustrating an example process for data encryption in accordance with one embodiment of the invention. Referring now to FIG. 21, the example illustrated describes an embodiment wherein a portion of the received data stream 400 is encrypted. More particularly, in the illustrated example, a portion of the account number (sometimes referred to as a PAN) is encrypted. In the illustrated example, the bank identification number 404, the last four of the digits of the account number 408, and expiration date 410 are left in clear text, while the middle six digits 406 of the account number are encrypted. For ease of discussion, the middle six digits of the account number 406 are referred to as PAN 406, even though they make up only a portion of what might typically be considered the account number string.

Referring to the illustrated example, the portion of the account number that is encrypted (PAN 406) is made up of the numeric string 345678. The key in the illustrated example is represented in hexadecimal form by the sequence 4F3C27. As discussed above, key 411 can come from any of a number of sources such as, for example, a merchant ID, a terminal ID, a serial number, or other key source as may be determined for a given application. In this example, the central portion of the account number 406 is modulo 10 added to key 411 to arrive at an encrypted PAN 406′. In the illustrated example, as a result of the modulo 10 addition the encrypted PAN 406′ yields the string 798895.

Illustrated as data block 400′ is the reconstructed data string with the encrypted PAN 406′ put in place of the original account number portion 406. In one embodiment, this data can repackaged and transmitted as the transaction data with a portion of the account number rewritten as encrypted PAN 406′. In another embodiment, the encrypted portion of the PAN 406′ can be encrypted again to result in an encrypted PAN 406″, which in this example is the string 627803.

For example, in one embodiment, the encrypted portion of the account number 406 is encrypted using a key such as, for example, a merchant key. This portion of the data can be re-encrypted with a second key for enhanced security or to provide additional features. For example, this portion of the data can be encrypted again with the terminal ID and a rolling counter to ensure that the data looks different for each merchant as well as for each swipe even at the same terminal. Although in the example illustrated in FIG. 1 performs the second encryption on the encrypted portion of the account number 406′, other embodiments contemplate this second encryption step being performed to the entire data set or other portions of the data set as may be determined appropriate for a given application. Thus, some or all of data block 400′ can be encrypted with the second key and repackaged to create a new data block. Additionally, this operation is not limited to the data items shown (bin, middle portion of account number, last four, and expiration date) but can be used with any or all of the data on one or more tracks of a bank card or other data as may be associated with a given token 111, regardless of token type.

Also illustrated in FIG. 21 is an updated expiration date 410′. As stated above, in some embodiments a flag or other indicator can be set to provide an indication to subsequent processing equipment regarding whether the transaction data includes encrypted data. In this example, the expiration date is incremented by twelve years to indicate that the transaction has been encrypted in accordance with a given encryption paradigm. As would be apparent to one of ordinary skill in the art after reading this discussion, alternative flags or indicators can be utilized. One advantage that might be obtained by altering the expiration date (or other token data item) is that the indicator can be included in the data set without requiring additional fields to be included. Another advantage that might be obtained by altering the data in a predetermined manner is that the original data can be recovered for use in processing.

Also illustrated in FIG. 21 is a substitution table 419 that can be further utilized in the encryption process. For example, an entry in a substitution table can provide an additional measure of security in the encryption process. For example, when the encryption is performed utilizing modulo 10 addition, a would-be perpetrator of fraudulent activities could, given multiple sets of encrypted data, work backwards to determine the encryption key. Thus, using a substitution table, to substitute table entries for key values is one way to hinder the ability of someone to work backward to obtain key information. For example, in terms of the scenario illustrated in FIG. 21, key 411 is made up of the string 4F3C27 and the first entry in the substitution table 419 includes the string 143792 . . . . To use the substitution table, the process first determines that the leftmost digit in key 411 is the numeral 4. Thus, the process would look to the fourth digit in the appropriate entry of the substitution table 419, which in this case is the numeral seven (enlarged in the Figure for emphasis), and this numeral substituted for that digit of the key. The process could be implemented to continue in a like manner for the remaining digits of the key such that a given key is properly substituted with a designated entry in a substitution table.

In one embodiment, the substitution table entries themselves can be changed on a periodic basis or from time-to-time to provide further data security. With changing values in a substitution table, it can require even more effort to trace backwards to find an encryption key. For example, in embodiment, substitution table entries are generated using a random number generator or other algorithm and like entries can be generated at the decryption end using a similar algorithm to duplicate the substitution table at the server. More particularly, in one embodiment, the seed for the random number generator is a merchant key itself. As this example serves to illustrate, a number of different configurations can be implemented to populate and utilize a substitution table in the encryption process. This also serves to illustrate that other mechanisms alternative to substitution tables can be implemented to further obscure the key or the encryption process.

In some applications, token data can include a mod 10 check character or other code, character or characters to provide a check to the data. In such applications, a receiving system will perform a designated operation on the received data to see if the check character matches that provided. For example, the digits of the received string might be modulo 10 added together to see if they arrive at the same modulo 10 checksum. If so, this is an indication of the validity of the received data. However, in above-described embodiments, some or all of the token data is encrypted. Where at least some of the data is used to generate a check character or check sum, re-computing the check sum at the receive end would (or statistically should) result in an error. Therefore, in one embodiment of the invention, this character or string of characters is recreated and inserted into the data stream after encryption, such that the check can occur at the receiving end using the encrypted data. Such an embodiment would be useful to enable the identified encryption techniques to be used with conventional data processing systems, for example, that have been configured for operation with unencrypted data sets. As another alternative, the encrypted data items can be decrypted prior to performing the error check.

Embodiments have been described above wherein some or all of the token data 111 is encrypted for secure transmission. For example, one embodiment associated with bank cards was described as encrypting a portion of the account number while leaving the bank identification number and other information in clear text form. Another embodiment is now described wherein a portion of an account number is encrypted and discretionary data on the card is also encrypted. FIG. 22 is a diagram illustrating a process for performing such encryption in accordance with this embodiment of the invention. Referring now to FIG. 22, in a step 422 the token data is read. In this example, the token data is the track data from a bank card or other like card. In a step 423 the designated portion of the account number is encrypted. For example, in keeping with one of the above-described scenarios, the first six digits (or BIN) are kept in clear text, the next six digits are encrypted (PAN 406 in an above example), and the last digits remain in clear text. In a step 425, the discretionary data is encrypted and in a step 427 the encrypted data is repackaged with the remainder of the track data for transaction processing.

One example scenario for performing encryption of the account information and discretionary data in accordance with the example of FIG. 22 is now described. After reading the following description, it will become apparent to one of ordinary skill in the art how alternative encryption techniques can be used with this and other embodiments. FIG. 23 is an operational flow diagram illustrating a process for encrypting a portion of the account number in accordance with one embodiment of the invention. FIG. 24, which comprises FIGS. 24A, 24B and 24C, is a diagram illustrating an example of creating a pad and translating the pan using substitution tables in accordance with one embodiment of the invention. FIG. 25 is a diagram illustrating encryption of the PAN in accordance with one embodiment of the invention.

Referring now to FIGS. 23, 24 and 25, in a step 422 the token data is read. For example, in the case of a bank card, the data from tracks 1, 2 or 3 is read. FIG. 24 illustrates an example of track data 400, or a portion thereof, comprised of a bin 404, a portion of account number 406, a checksum 407, the last two digits of the account number 408, an expiration date 410, a service code 412, and discretionary data 414. In this document and in this example, the central portion of the account number that is going to be encrypted designated by reference character 406 is referred to as the PAN 406. It should be noted, that the account number in this example includes all sixteen digits 404, 406 and 408 and this is sometimes also referred to as the PAN. However, for this example, PAN 406 refers to the central portion of the account number, which in this example is the seven-digit string 0292011.

In a step 423, a pad is created for later use in encryption. In one embodiment, the pad is created by encrypting the bin 404, the last clear digits 408, and the expiration date 410 with a key. Although any of a number of keys can be used, in one embodiment, the key utilized is a merchant key Km. This is illustrated in FIG. 24B wherein the key Km is used to encrypt the bin, the clear digits, and the expiration date (represented by string 418) to create a pad 420. In this example, the encrypted string is filled with leading zeros 416 prior to encryption.

As a result of this operation, the pad 420 is created that can subsequently be used to encrypt PAN 406. In one embodiment, because PAN 406 is seven digits, the first seven digits of the pad 420 are used to encrypt PAN 406, although other alternatives are contemplated. Key Km can be a key from a number of different sources and stored in the detection device for use by encryption module 132, for example. In one embodiment key Km is a merchant key, although other keys can be utilized.

In a step 425, a substitution table is used to translate pan 406 to create a translated pan 406′. An example is illustrated in FIG. 24C where a substitution table 419 includes two entries: one entry containing a string for the odd-placed digits and a second entry containing a string for the even-placed digits. In this example, each digit of PAN 406 is run through its respective odd or even table entry to find the substitution character to put in place thereof. Thus, the first digit of pan 406 would be run through the odd entry. As this first digit is a zero, the first entry (entry 0), which is a nine, is pulled from substitution table 419 and placed in the left-most digit of translated pan 406′. Likewise, the second digit is an even-placed digit and in this example is the numeral two. Thus, the third entry (the first entry corresponding to place 0) from the even entry of substitution 419 is placed in the second digit of the translated pan 406′. This operation continues in a like fashion to arrive at the string 9202918 for translated pan 406′.

In a step 427, the translated pan 406′ is encrypted to result in an encrypted pan 422. One example process for this is illustrated in FIG. 25 wherein translated pan 406′ is encrypted with pad 420 to result in an encrypted pan 422. In one embodiment, translated pan 406′ is modulo 10 added with pad 420 to result in encrypted translated pan 422. In keeping with the current example, pad 420 comprises this string 4FDCC52 and translated pan includes the string 9202918. Note that in this embodiment where the encryption is modulo 10 addition, the first seven digits only of pad 420 are used. Pad 420 is modulo 10 added to translated pan 406′ and results encrypted translated pan 422, which in this example is the string 3734160.

In a step 427B, the original pan is shifted by one digit and in a step 427C modulo 10 added to the encrypted translated pan 422 to result in a final encrypted pan 424. In keeping with the illustrated example, the result of this addition yields the string 3753361 for final encrypted pan 424.

As would become apparent to one of ordinary skill in the art after reading this description, the above-process can be implemented in reverse at the processing end of the transaction to arrive at the clear text pan 406.

Referring back to FIG. 22, in the described example embodiment, discretionary data is also encrypted. Although a number of techniques can be used to encrypt discretionary data (as is the case with other encryption processes described herein). One example technique for encrypting discretionary data is now described with reference to FIGS. 26, 27 and 28. FIG. 26 is an operational flow diagram illustrating an example process for encrypting discretionary data in accordance with one embodiment of the invention. FIG. 27, which comprises FIGS. 27 a and 27 b, is a diagram illustrating an example of creating a pad and translating the pan using substitution tables in accordance with one embodiment of the invention. FIG. 28 is a diagram illustrating encryption of the discretionary data in accordance with one embodiment of the invention. Referring now to FIGS. 26, 27 and 28 in a step 462 the card data is read to obtain the discretionary data. In embodiments where encryption of discretionary data is performed along with encryption of other data, the discretionary data can be read at the same time.

In one embodiment, a terminal ID and sequence number are used to generate the encryption key for the discretionary data. Thus, in this embodiment, in a step 464, the system retrieves the terminal key and sequence number for use in this process. As one particular example, a terminal key Kt is illustrated in FIG. 27A. In a step 466, the terminal key is used to encrypt portions of the token data to obtain the pan pad 480. In the particular example illustrated in FIG. 27A, the bin number, expiration date number and sequence number 482, with a leading zero fill 484 are encrypted with key Kt to arrive at pad 480.

Additionally, the sequence number can be used to update the service table entry, or service code as may be appropriate. For example, in one embodiment, a service code can be replaced with a predetermined leading digit (for example, nine) and the least significant two digits are the sequence number. For example, in the example environment, it is common for credit cards to have a service code of 101. in the present example, the leading one can be replaced by a nine, and the second two digits, 01, can be replaced by the sequence number. As such, when a 9 is detected in the service code leading digit, the second and third digits are recognized as the sequence number, which can be used as such. The sequence number is used, and the service code can then be restored (for example, to 101). This can be another way to identify the presence of encrypted data.

In a step 468, the discretionary can be translated such as, for example, using a discretionary data substitution table. Thus in the example illustrated in FIG. 27 b, the original discretionary data string 0000041800000 is replaced by translated discretionary data string 486′ 9090948890909. In one embodiment, the same substitution tables can be used (i.e., tables 419) resulting in the above arrived at substitution, or different substitution tables can be used.

In a step 470, the discretionary data is encrypted. In accordance with the illustrated example, in a step 470A the pad 480 is used to encrypt substituted discretionary data 486′ to result in encrypted substituted discretionary data 492. In one embodiment, this encryption can be accomplished by modulo 10 addition of pad 480 with translated discretionary data 486′.

In a step 470B, the discretionary data is shifted by one as illustrated by block 406″ and encrypted with encrypted translated discretionary data 492 to arrive at encrypted discretionary data 494. In one embodiment, this encryption can be performed by modulo 10 adding encrypted translated discretionary data 492 with shifted discretionary data 406″ to arrive at encrypted discretionary data 494.

Referring again to FIG. 22 in this example it was noted that after the PAN and discretionary data are encrypted a substitution can be performed in step 427 to package the data for the transaction. Particularly, in accordance with the example described with reference to FIGS. 23 through 28, the following string can be repackaged.

Additionally, a new mod 10 character can be generated and a new LRC resulting in the string illustrated in paragraph 8 of Appendix C. Additionally, a flag can be set such as adding twelve to expiration date. Thus, in the illustrated example, the repackaged data with the updated mod 10 character and LRC might look like: 4500663753361213=19039130779474182100?.

To further illustrate the various encryption algorithm possibilities, an additional example encryption and decryption algorithm are now described. The example is described with reference to encrypting Track 2 data, but other data can be encrypted as well. In one embodiment, the algorithm can first check the data for the presence of a command card as described in more detail below. Then, in one embodiment, the algorithm generates a one time CTR (counter mode) 3 DES stream cipher encryption block, Ki. In this example, this is accomplished as follows:

-   a. Construct KA, a string of 64 bits consisting of concatenating,     from left to right -   i. The Magnetic Stripe Reader key counter (MKC) -   ii. Pad the remaining area with the card issuer discretionary data     (DD) up to and including the LRC character. -   iii. Pad any remaining area with ‘0’, (0x30). -   b. Select the domain key (DMK) and the terminal key (TMK) set from     the BIN mask key table** -   c. Encrypt Ka with DMK, giving block Kb -   d. Decrypt Kb with TMK, giving block Kc -   e. Encrypt Kc with DMK, giving block Kd -   f. Expand 64 bit block Kd into a 20 digit decimal value into giving     block Ke -   g. Drop the leftmost digit giving 19 digit stream cipher encryption     block Ki

In a next step, the data to be encrypted, (in this case, the track two data) is combined with the 3 DES stream cipher encryption block, Ki left to right as follows:

-   h. Using mod 10 addition, add Ki digits to the PAN excluding the     first 1 through 6 digits based on the BIN mask key table** and the     mod 10 check digit. Use the Ki digits from leftmost in succession. -   i. Using mod mod 12 addition, add the expiration month with the next     Ki digit -   j. Using mod 100 addition add the expiration year with the next Ki     digit -   k. Using mod 10 addition, add the next three Ki digits to the three     service code digits.

The algorithm then generates a new mod 10 check character for the modified data, adds 5 to the new check digit (mod 10) and places it into the track two data. It then multiplies the MKC by 2 and places the decimal result in the PVV (5 digit pin verification field) track data field. Then it increments mod 50,000 (roll over at 49,000) and stores the new MSC, dropping the leftmost digit and mod 10 digit giving string EPAN.

For decryption in accordance with this example, in a first step, the decryption algorithm first completes a mod 10 check on the card data. If the check passes, it forwards the track two data without decrypting. If the check fails, the algorithm can check to see if this is command data. For example, in one embodiment, the algorithm can subtract 5 from the track data check digit (mod 10) and recheck using this new mod 10-5 check value. If check fails it forwards track data with mod 10 check error. Then, if the expiration year is 80 then the card data is a command. If so, it can process the command using the command decryption algorithm.

For decryption, the algorithm generates the one time CTR (counter mode) TDES stream cipher encryption block Ki as follows:

-   a. Construct KA, a string of 64 bits consisting of concatenating,     from left to right -   i. PVV from track data divided by 2, The MKC from reader. -   ii. Pad the remaining area with the card issuer discretionary data     (DD) up to and including the LRC character. -   iii. Pad any remaining area with ‘0’, (0x30). -   b. Retrieve terminal keys DMK and TMK and last MSC -   c. Compare the new MSC with the last stored value -   i. If new MSC is greater than the old MSC save the new value. -   ii. If new MSC is not greater than the old MSC flag a duplicate     transaction error. -   d. Encrypt Ka with DMK, giving block Kb -   e. Decrypt Kb with TMK, giving block Kc -   f. Encrypt Kc with DMK, giving block Kd -   g. Expand 64 bit block Kd into a 20 digit decimal value into giving     block Ke -   h. Drop the leftmost digit giving 19 digit stream cipher encryption     block Ki

The algorithm then combines the track two data with Ki left to right as follows and provides the cleartext data.

-   i. Using mod 10 subtraction, add Ki digits to the PAN excluding the     first digit and the mod 10 check digit. Use the Ki digits from     leftmost in succession. -   j. Using mod mod 12 subtraction, subtract the expiration month with     the next Ki digit -   k. Using mod 100 subtraction, subtract the expiration year with the     next Ki digit -   l. Using mod 10 subtraction, subtract the next three Ki digits to     the three service code digits.

Using a stream encipher based on a merchant key, BIN and expiration date to encrypt the PAN can lead to the ability to uncover the encryption mask for cards with the same BIN and expiration date. In one embodiment, a hash code is used for the encrypted PAN digits and a hash table provided at the secure transaction module to contain the possible hashes and originating PANs.

In one embodiment, the encryption can be performed such that encryption of the data yields a plurality of bytes of encrypted data. For example, in one embodiment, encrypting six digits of the PAN can lead to binary data. The bytes can be selected and put back into the string. At decryption, the key can be used to generate all possible outcomes, and the secure transaction module can look up the PAN that generated the resultant outcome. As another example, the first for account digits representing the BIN or Bank Identification Number are left as clear text along with the card expiration date and the last four digits of the account number for the POS to use in card verification and receipt printing. Nineteen digits of the remaining card data can be converted to an 8 byte binary value. A time stamp can be added and the result encrypted. The 8 bytes of encrypted data can be converted to a 20 digit base 10 number, and the least significant 19 digits replace the selected card digits. The last digit, a 0 or 1, is added to a bank field. A new mod 10 character is generated and placed into the selected card digit. The combination of encrypted and clear text data output to the terminal.

In yet another embodiment, the encryption block size is may be larger than the available number of digits to be encoded. In such an embodiment, an output feedback mode or counter mode of block encryption may be employed. In these methods fixed data including such variables as the serial number and portions of the clear text card data along with a changing value such as a counter incremented with each block output is encrypted using the desired encryption algorithm. The output bits from the encryption can be combined (for example, XORed or modulo 10 added) with the data to be encrypted. In the case that the card digits to be encrypted range for 0 to 9, as commonly found for track 2 data, 3 bits of the encryption are XORed with each digit from 0 through 7. The digits 8 and 9 are left in clear text. Because fewer steps are often required for output feedback mode or counter mode of block encryption there use may preferred over other methods.

A BIN mask key table can be used to allow for selecting BIN ranges and encryption options for the installed keys. For example, in one embodiment a key is assigned to a BIN range based on a BIN Mask. Each entry might include a BIN mask, a domain key, a command key, a terminal key associated with the mask, and a MKC swipe key counter for the BIN mask. The BIN mask can include, for example, six bytes. In one embodiment, it is implemented such that any byte position that contains a digit 0-9 must match the corresponding card data to be selected; any byte position that contains 0xA or 0xB will match any value in the corresponding card data position; and byte positions containing 0xA will be encrypted while 0xB positions will be left in clear text in the track two data output.

In one or more embodiments described above, pin pads, magnetic stripe readers, RFID transponders, near-field readers, optical scanners, and other data capture devices can be configured or reconfigured to include encryption functionality to encrypt some or all of the token data as well as some or all of any associated additional data (for example, PIN data) for tokens 111 of various types. Encryption modules such as, for example, encryption module 132 can be included to provide functionality to perform desired encryptions. Additionally, as stated, memory or other data storage can be provided for keys, algorithms, associated firmware or software, interim and final processing results, and other encryption information. In some of the embodiments, some or all of the functionality, and particularly the encryption functionality and data storage, are described as being encapsulated within the token reader to provide a measure of data security.

At a point in time or from time-to-time it may be desired to upgrade or update or otherwise modify some or all of the encryption module to achieve, for example, updated keys, updated key generation algorithms, updated encryption algorithms, and other changes, modifications, additions or enhancements as may be desired from time-to-time. However, in embodiments where some or all of this functionality is embedded with the data capture device, such enhancements may be difficult to implement quickly, easily and in a cost-effective manner in the field. This can be exacerbated by the fact that in certain applications (for example, in the bank card applications) there may be thousands of data capture devices to update and maintain.

Therefore, in this and other embodiments, techniques can be implemented to perform such enhancements via download or other like mechanism. For example, in one embodiment, a command token can be provided that provides updates to encryption information such as, for example, keys, operational algorithms (for example, encryption algorithms, key-generation algorithms, hash functions and so on), stored data elements or other encryption information. For example, in one embodiment, a command token can be encoded with command information such that, when it is read by an electronic data capture device, it can cause the data capture device to be updated with the new encryption information. For example, particular characters or strings can be included with the command card to instruct the data capture device, upon reading the command token, to enter an update mode or to accept an update. Information on the command token or information from an external source can be downloaded to the data capture device to provide the necessary updates. In another embodiment, the electronic data capture device can be instructed to retrieve or receive downloads via a transaction communication data path or other data input path. For example, upon entry into an update mode, the data capture device can be configured to receive and accept information from a terminal, gateway, transaction processing network entity, or other entity to perform the updates. As another embodiment, the electronic data capture device can be instructed to retrieve or receive downloads via a serial or parallel or other data port.

In another embodiment, an appropriate command or command string can be sent from the terminal, gateway, transaction processing network or other entity to cause the electronic data capture device to enter an update mode or to otherwise accept updated algorithms, firmware, or other software, as well as encryption information items.

In one embodiment now described, a command token is used to initiate the update mode. To better illustrate this embodiment, it is described in terms of an example implementation scenario wherein the application of the electronic data capture device is a magnetic stripe reader configured to read bank cards. After reading this description, it will become apparent to one of ordinary skill in the art how command tokens can be implemented in other scenarios and applications as well.

FIG. 29 is an operational flow diagram illustrating a process for initiating an update mode or other command mode in accordance with one embodiment of the invention. This flow is described in terms of the example scenario where the command token is a magnetic stripe card. Referring now to FIG. 29, in a step 612 the command card is swiped at the magnetic card reader and its data read. In a step 614, the data on the command card is checked and in step 616 it is determined whether the data indicates that the card is a command card. For example, in one embodiment, a predetermined BIN number or range of BIN numbers is designated as being associated with a command card. As such, in this embodiment, in a step 614, the electronic data capture device can be configured to search the BIN database to determine whether the received BIN information matches BIN information in the database indicating that the card swiped is a command card. Other characters or data strings can be used to indicate whether a given card is a command card, however, the present example is described in terms of a predetermined BIN or BIN range.

If, in step 616 it is determined that the card swiped is a command card, the command is processed in a step 618. For example, commands can be included to update algorithms, keys, merchant IDs terminal IDs, sequence numbers, or other encryption information. A few example embodiments for processing command card functions are discussed below. Other examples can include commands to turn encryption on or off for all cards or for certain cards. For example, commands can be generated to affect only cards with certain BINs or BIN ranges.

If the swiped token is not a command card, normal operation can ensue wherein in a step 619 the data capture device determines whether the data from the token is to be encrypted prior to sending it along for processing. If not, in a step 620, the data is output in clear text form. If, on the other hand, some or all of the token data is to be encrypted, in a step 622, the data can be encrypted, repackaged, and output as a token data stream as illustrated in step 624.

FIG. 30 is an operational flow diagram illustrating an example process for encrypting some or all of the token data in accordance with one embodiment of the invention. As described above, with reference to one or more embodiments, a check character can be included in the token data to indicate card read errors or data transmission errors. Thus, in a step 632, the check character is checked to determine whether it is correct. If so, in a step 634, the appropriate key is generated or retrieved, the appropriate data encrypted with the key in a step 636. As also discussed above, to enable operation with downstream components a new check character can be created based on the encrypted data in step 638 and the data output for transaction processing in a step 640. In one embodiment, the system can be implemented such that an incorrect check character may indicate that the token is a command token (a command card in terms of the above-described example application).

FIG. 31 is an operational flow diagram illustrating an example process for using the check character to determine whether the token is a command token in accordance with one embodiment of the invention. Again, this description is provided in terms of the example application of a bank card. Referring now to FIG. 31, in a step 652, the check character is checked to determine whether it is correct. This can be the same as step 632 described above with reference to FIG. 30. If the check character is good, as illustrated by decision box 654, the encryption proceeds as illustrated by step 656. For example, in one embodiment, the encryption can proceed on a normal basis as described above with reference to FIG. 30. If, on the other hand, the check of check character reveals an error or otherwise invalid entry, the card can be retested.

In one embodiment, the check character can be modified in such a way such that a known error indicates the potential presence of a command card. For example, in one embodiment, the check digit is decremented by a predetermined value (for example, 5) to indicate the presence of a command card. Thus, in the illustrated embodiment, in a step 658, the value 5 is added to the check digit and the data retested. If the test fails in step 660, this may indicate an error in the data.

If, on the other hand, the test now passes with the updated check digit, this may be enough confirmation in one embodiment to indicate the presence of a command card. However, in another embodiment, additional information can be used to verify the presence of a command card or other command token. For example, as discussed above, in one embodiment a BIN or BIN range is used to identify a command card. In another embodiment, a particular expiration date value can also be used to identify the presence of a command card. As a further example, in one embodiment, the expiration date field of a command card is set to a value (for example, 80 or 99) to indicate that the card containing that data is a command card. Thus, in terms of this example, in a step 662 the expiration date is checked to determine whether it is set to the designated value and if so in a step 664, it is properly identified as a command card and the command can be processed. If, on the other hand, the expiration is not at the designated value, or the other command parameter does not match, depending on the embodiment, an error results as illustrated by step 669.

FIG. 32 is a diagram illustrating an example procedure for handling command tokens in accordance with one embodiment of the invention. Referring now to FIG. 32, in a step 704, data is read by the data capture device. For example, in the context of an example application using command cards having magnetic stripes, the magnetic stripe data is read by a magnetic stripe reader. As discussed above, one or more processes can be used to determine whether the card being read is a command card, or command token in other embodiments, or whether it is a conventional or non-command token.

As stated above, in numerous embodiments, the data that is read from the token, even if encrypted, can be packaged such that it contains the appropriate fields or at least is in the correct format as anticipated by the transaction processing equipment within the transaction processing network. Also, as discussed above, in one embodiment, information resulting from the reading of a command token can be sent to downstream equipment for command processing. Thus, in one embodiment, in a step 706 the data capture device requests data entry of the user as if a conventional non-command transaction were taking place. Thus, for example, in terms of the bank card scenario, the data capture device might ask the user to enter a transaction amount such that this data can be plugged into the data package for transmission. In an alternative embodiment, fill data or dummy data can be included to ensure a complete data package is provided. In this manner, the transaction data can be complete for transmitting the command transaction to the server or other processing equipment.

In a step 708, the data is packaged and sent to the server or other processing equipment. As discussed, in one embodiment, this data can be packaged in accordance with a format expected by the downstream processing equipment. Additionally, in one embodiment, the data can be encrypted to provide a measure of security in the transmitted data.

In one embodiment, commands can be triggered at the data capture device upon reading the command token. Thus, encryption keys, encryption algorithms, firmware updates, and other command information can be provided to the data capture device or to the terminal directly from the command card. For example, command information might be included in the track data of the magnetic stripe card, or additional information might be included with the card to supply the appropriate command information. In another embodiment, tokens with memory or other data facilities can be used to provide command information updates to the token reader. For example, smart cards, chip cards, ICCs, etc can be used to provide command information to update the reader.

In one embodiment, command tokens can take the same form as conventional tokens, and provide data by the same mechanisms. In another embodiment, specialized command tokens can be provided. Consider again the bank card example, instead of a command card with a magnetic stripe containing command data, another form of token can be provided that can be read by the magnetic stripe reader. For example, a circuit card containing traces that carry electrical signals can be provided. The traces can be spaced along an area where the card is read by the reader. Electrical signals can be sent along the traces so that the magnetic head senses the electromagnetic field of the traces and reads this information as it reads magnetic stripe information. Thus, the use of traces and control logic to provide electrical signals along the traces in a desired pattern can be used to provide a command card. Such a command card could be programmable and reprogrammable, for example by programming the control logic associated with the card. In another embodiment, a magnetic transponder can be provided to be placed in proximity of the head and used to send electromagnetic pulses to the head such that it mimics the swipe of a magnetic card. The pulses are programmed to convey the command data to the head. Signatures or other keys can be provided with such alternative tokens to ensure authenticity. Additionally, PINs or other verification techniques can be used to verify the authenticity of the command token, the user and the location of use. In yet another embodiment, a card containing contacts can be used to make direct electrical contact with the read head to transfer command information via a physical conductive signal path. The contacts can be made to head structure items such as the casing, isolation plates between the tracks, the cores, or other contact points. Additionally, contact points can be added to make electrical contact with the command card for data transfer.

This information can also be sent to the terminal or other downstream processing equipment (including a PIN pad) to update the processing equipment as well. For example, for an update to keys, the updated set of keys can be transmitted to the transaction processing servers or secure transaction modules such that they have the correct keys to decrypt data that was encrypted by the data capture device. As a further example with respect to an update to keys, in an embodiment where the terminal decrypts the information prior to transmission, the keys can be provided to the terminal for decryption purposes.

These keys can be transmitted in an encrypted fashion to preserve their integrity. As another example, where a new random number generator or other algorithm that might be used to generate keys is provided as an update, this algorithm can be updated at the data capture device and sent, in some embodiments in encrypted form, to the transaction processing server to update their records as well. In an example where keys are generated at the data capture device or terminal, the new keys can be sent to the decryption service (for example, to a secure transaction module) in a transaction like message and can include the terminal identifier, new key and a new sequence starting number (sequence numbers need not be continuous). The decryption service may store historical keys for use with trailing transactions.

In one embodiment, the updated information sent to downstream equipment can be repackaged into the token data such that it replaces data that would otherwise be provided in a conventional token. For example, in the case of a bank card, the new information might be included as track data such that it can be extracted by the gateway or other transaction processing entity or server upon recognition that the transaction data includes command information.

In another embodiment, a command token can be used to trigger a data capture device to retrieve command or other update information from a terminal gateway transaction processing entity or other downstream transaction equipment. For example, a command card or other command token may result in a transaction being sent to a downstream processing device and upon decoding, the downstream transaction device retrieves the appropriate information (for example, updated keys, algorithms, firmware, and so on) and returns these to the electronic data capture device for updating. Preferably, in one embodiment, the returned items are returned encrypted so as to provide a measure of security.

As a further example to illustrate the possible functions that can be included, consider again an example for key updates. New keys might be included on the command card or the command card might instruct the data capture device to retrieve the keys from the terminal. Alternatively, the command card might initiate a transaction that causes new keys to be sent from another entity such as the secure transaction module. As another example, the command card might simply cause the data capture device or terminal to generate a new set of keys using a key generation algorithm, such as, for example, a random number generator.

FIG. 33 is an operational flow diagram illustrating an example process wherein a gateway or other downstream entity receives a command transaction and returns command information in accordance with one embodiment of the invention. Referring now to FIG. 33, in a step 712, a transaction is received at the processing entity. For example, in one embodiment, the transactions can be received at a gateway 120 and the transaction decoded and determined that it is a command transaction. For example, in terms of the embodiments described above, in a step 714, the appropriate decryption process can be called or the transaction sent to a secure transaction module such that the data can be decrypted and returned to the gateway or other transaction processing entity for handling.

Once decrypted, if it is not a command transaction, normal processing can ensue as illustrated by step 718. Alternatively, if the transaction is a command transaction as determined in step 716, the command information can be retrieved and acted on appropriately.

For example, in one embodiment described above, particular BIN ranges are assigned to indicate the presence of a command card and the bank card scenario. Thus, in such an application, the gateway or other transaction processing entity can check the BIN to determine whether it should be routed for normal processing or whether it is a command card and command operations should take place. In embodiments where the BIN range is sent is clear text, this information can be determined by the gateway or other processing entity upon receipt of the transaction. In embodiments where the BIN is encrypted, a decryption operation (such as that illustrated in step 714) may take place. To retrieve the clear text BIN such that the appropriate decision can be made. In yet another embodiment, only a portion of the BIN needs to be in clear text to make the determination. This example serves to illustrate how other fields in the transaction data might be used to identify the presence of a command transaction generated by a command token.

Continuing with FIG. 33, in this embodiment, command information is retrieved and returned to the data capture device for updating as illustrated in step 720. For example, in one embodiment, keys, algorithms, firmware updates, or other command information, can be retrieved as appropriate to the command and returned to the data capture device to update the device. Although not illustrated in FIG. 33, this information can be encrypted prior to transmission back to the data capture device for update.

In one embodiment, the information can be returned to a particular data capture device or alternatively broadcast to one or more data captures devices as may be appropriate for the given transaction. For example, a merchant may desire to update the merchant ID, or the keys, or a key generation algorithm from multiple terminals and may generate a command to update the information at the server (for example, at the gateway) and to have this information rebroadcast to all the terminals in that merchant's network. As such, the information can be broadcast to all of the terminals or a subset of the terminals as may be appropriately identified.

In a step 722 the local data at the gateway or other transaction processing entity or server can be updated as well to ensure that the appropriate keys, algorithms or other information are in place for use by the transaction processor in handling transactions generated by an updated terminal.

The process described with reference to FIG. 33 is one in which command information is retrieved by the server and sent back to the data capture device. In another embodiment, command information can be obtained based on the token data and used to locally update the data capture device or terminal prior to transmitting the information to the server. Thus, in this embodiment, the data capture device can be configured to update its local records and information to include the new command information. This information can be packaged for transmission in step 708 to the transaction processing server. As stated above, in the example application of bank card transactions, the information can be formatted and sent as track two data, or other track data, in one embodiment.

FIG. 34 is an operational flow diagram illustrating an example process for receiving this command information at the transaction processing server. Referring now to FIG. 34, in a step 712, the transaction is received by the transaction processor. For example, the transaction processor may be a gateway 120 or other transaction processing entity.

In one embodiment, reception of the transaction, decrypting information as appropriate, and determining whether the transaction is a command transaction can take place as discussed with reference to steps 712 through 718.

In a step 724 command information included in the transaction is extracted. Because this embodiment illustrates an example where the command information is sent from the data capture device to the processing server, this step 724 extracts that command information from the transaction and is used to update the local information in a step 726.

In one embodiment, including those discussed above with reference to FIGS. 33 and 34, a confirmation transaction can be returned to the data capture device to confirm that the updates have taken place. For example, instead of returning an “authorized” or “unauthorized” response to a purchase transaction, the server may return a command response that says, “keys updated” or “firmware updated” or “encryption enabled” other appropriate message indicating that the command information was successfully updated at the server. Or that the information was updated locally at the data capture device or terminal.

In one embodiment, the encrypted command information is stored as data in one of the tracks on the Command Card. Tracks 1, 2 or 3 can be used. Note that in one environment, a conventional bank card may have traditional track 2 information encoded at 75 BPI. In one embodiment in this environment, command data can be coded as track 2 data in place of the bank card information. In one embodiment, this data can be coded at a higher density, for example at 210 BPI. Thus, in such an embodiment, the different density can be used to detect the presence of a command card.

Once the command card has been swiped, the data capture device takes the appropriate action and then outputs track data to the POS device that is specially formatted to look and feel like a valid credit card swipe. For example, in embodiments where the encryption and command processing is embedded in the head, the head outputs the command information as Track II data to the terminal. In one embodiment, where the data is packaged as normal transaction data, the POS device is not aware that a command card has been swiped and treats the track II data as a normal credit transaction.

In one embodiment, the system can be implemented such that to use a command card, the user would perform the standard steps required to process a credit card transaction on the POS device. For example, the user would swipe the command card instead of a credit card to initiate the command card transaction. Once the command card transaction is initiated, the transaction is routed to a secure transaction module (for example, at the gateway or at a transaction processing entity). The secure transaction module decrypts the data and identifies that the transaction is a command card request. As stated above, in one embodiment this is accomplished by checking the BIN range used. In one embodiment, command cards can be configured to use a predetermined available BIN or BIN range.

After the command card is processed by the secure transaction module, in one embodiment a result code is returned to the gateway informing the gateway that a command card was just processed. In one embodiment, the gateway then routes the transaction back to the terminal with a DECLINE message (for example, such as those command responses outlined above). Also, because the result code received by the gateway indicates a command card, in one embodiment the transaction is not routed to the processor for authorization, but instead, back to the terminal.

In one embodiment, the following is a list of possible display elements that can be provided to a terminal user upon successful recognition of a command card, although others are possible. The below examples include examples where the commands are to toggle encryption on, toggle encryption off or set new encryption keys.

-   -   RESULT     -   DECLINE—TOGGLE ON     -   DECLINE—TOGGLE OFF     -   DECLINE—SET NEW KEYS

The reason a DECLINE message is used for the command cards in one embodiment, is that most conventional POS software applications are set up to do batch settlement. Therefore a DECLINE message is sent to the POS device so that the POS application does not store the command transaction in the daily batch file.

To further illustrate the command token process, consider one example implementation of a command card that can perform one of three functions: TOGGLE ON, TOGGLE OFF, and SET NEW KEYS. Further consider an example where the encrypted data encoded on a track (for example, Track 3) of a “TOGGLE OFF” command card is: +000011006446234630464055130904121570916078214707708133244423255296057629521698582 25050?

The data capture device processes this command and formats the data to resemble typical Track II data found on a credit card. The data capture device turned off encryption and then generated valid Track II data to the POS device. Below is an example of the encrypted Track II data that is generated:

;515111894206706=18109007592857178221?

In one embodiment, for example where a sequence number is used, each time the data capture device generates Track II data, it is a unique number. The secure transaction module is configured in one embodiment to store a one-way hash of this Track II data. With the track II example above, the track data is deciphered as:

;5151110302000206=06101015678901234560?

By looking at key elements of the track data, the secure transaction module identifies that this command was a TOGGLE OFF for specified BIN ranges and then removes the keys for this specific POS device.

The result is sent back to the gateway and the result code returned tells the gateway to return a decline with the accompanying decryption supplied by the secure transaction module. The terminal then displays DECLINE—TOGGLE OFF and the command card process is now complete.

Consider another example where the command card is configured to execute the command to set new keys. In this example, a swipe of the command card generates unique track II encrypted data with a specified BIN number. In one embodiment, the SET NEW KEYS command can be configured to generate new terminal keys each time the command card is swiped. This can be used to eliminate the need to have multiple SET NEW KEYS command cards. Continuing with this example, the user processes the Set New Keys command card as a normal credit card transaction. The user can enter a transaction amount to allow the transaction to be sent to the gateway. Again, the amount of the transaction is irrelevant, since in this embodiment, a decline will be received by the POS device.

The encryption module at the data capture device can be configured to encrypt track data using different keys based on a number of factors. One such factor is the BIN range. In other words, different BIN ranges can be set up to use different encryption keys. For example, VISA transactions (which have a bin range of 400000-499999) can be set up to use one set of keys while MASTERCARD transactions (which have a bin range of 500000-599999) can be set up to use a completely different set of keys. Likewise, command functions, including functions such as updating keys, modifying encryption algorithms, toggling encryption on or off, and so on can be performed for all transactions or for just a subset of transactions. For example, here too the BIN or BIN ranges can be used to establish the applicability of a given command. Thus, for example, a card issuer may issue a command card for its own token set.

Additionally, this approach can be configured to give the merchant, gateway, or processor the flexibility to handle a plurality of different transaction types. For instance a merchant may have a loyalty card, stored-value card or store issued credit card that is routed to a different gateway or internal process than bank-issued cards. This functionality allows administrative selection of how different card types use (or whether they use) the encryption features of a data capture device application.

In one embodiment, signatures associated with command cards (or other command tokens) can be used to validate the command card prior to allowing the command transaction. For example, in the case of magnetic stripe cards, a SECURESTRIPE signature can be used to authenticate the card. Other signature techniques besides SECURESTRIPE can be used to verify the authenticity of the command card and the proper usage of the command card. Other information can be used to validate the usage of an authentic command token. For example, where a card is dedicated to a given merchant, the signature can be used to identify a card as belonging to that merchant, and the merchant ID in the datastream used to ensure that the command card is being used by the identified merchant. Likewise, a special key or other character string can be inserted in the command token to function like a signature, ensuring that the command card will only be used by a designated merchant, or in a designated fashion. As this example with merchant IDs illustrates, other data items can be used to authenticate a use of a command token, including serial numbers of the head or other data capture element, sequence numbers, location information, time stamps, user entered PINs or other codes, biometric data and so on.

A number of command algorithms can be implemented. A few example algorithms are now described. After reading this description, it will become apparent to one of ordinary skill in the art how other algorithms can be implemented.

In one embodiment a command decode algorithm can be provided. Where the processor determines that a command token data set is received it can, generate the one time CTR (counter mode) TDES stream cipher encryption block, Ki, as follows:

-   a. Construct Ka, a string of 64 bits consisting of concatenating,     from left to right -   i. PVV from track data divided by 2 -   ii. Pad the remaining area with ‘0’, (0x30). -   b. Retrieve the domain key (DMK) and the command key (CMK) for the     BIN value given. -   c. Encrypt Ka with DMK, giving block Kb -   d. Decrypt Kb with CMK, giving block Kc -   e. Encrypt Kc with DMK, giving block Kd -   f. Expand 64 bit block Kd into a 20 digit decimal value into giving     block Ke -   g. Drop the leftmost digit giving 19 digit stream cipher encryption     block Ki

The algorithm can then combine the track two data with Ki left to right as follows;

-   a. Using mod 10 addition, add Ki digits to the PAN excluding the     first 6 digits and the mod 10 check digit. Use the Ki digits from     leftmost in succession. -   b. Using mod 10 addition, add Ki digits to the digits following the     expiration date excluding the PVV. Use the Ki digits from leftmost     in succession.

A command string can be constructed by concatenating left to right the expiration date month; expiration year (for future expansion); the card PAN minus the mod 10 check character; and all card data following the expiration date up to the end sentinel. The MSR Command Process Algorithm is selected based on the expiration month and year.

As another example, a change terminal key algorithm can be provided. In this example, a new key is generated. In this example, the first step is to generate a new random key. This can be done as follows:

-   -   a. Construct Ka, a string of 64 bits consisting of         concatenating, from left to right         -   i. MSC for the selected BIN         -   ii. Last card swipe entropy nuance         -   iii. System clock cycle counter     -   b. Encrypt Ka with BIN domain key DMK, giving block Kb     -   c. Decrypt Kb with BIN terminal key TMK, giving block Kc     -   d. Encrypt Kc with OEM key, giving block Kd

Next the algorithm can expand 64 bit block Kd into a 20 digit decimal value giving block Ke. The 20th digit (0 or 1) is added to the current MKC *2 and the result placed in the output card data PVV field. The leftmost digit is dropped, giving 19 digit stream cipher encryption block Ki. The old old 64 bit terminal key is expanded into a 20 digit decimal value into giving block Ke. An MSR data stream is constructed to include:

-   a. Start sentinel -   b. Input data 6 BIN digits -   c. Leftmost 11 digits from Ke -   d. Input data expiration date -   e. Next 3 digits from Ke -   f. The 5 digit PVV from 6 above. -   g. The remaining digits in Ke -   h. CRC of all preceding digits -   i. End sentinel

A one time CTR (counter mode) TDES stream cipher encryption block Ki is generated as follows:

-   a. Construct KA, a string of 64 bits consisting of concatenating,     from left to right -   i. MSR key counter (MKC) -   ii. Pad the remaining area with the card issuer discretionary data     (DD) up to and including the LRC character from the command card     data. -   iii. Pad any remaining area with ‘0’, (0x30). -   b. Select the key set from the BIN mask key table** -   c. Encrypt Ka with DMK, giving block Kb -   d. Decrypt Kb with TMK, giving block Kc -   e. Encrypt Kc with DMK, giving block Kd -   f. Expand 64 bit block Kd into a 20 digit decimal value into giving     block Ke -   g. Drop the leftmost digit giving 19 digit stream cipher encryption     block Ki

Kd is saved as the new terminal key (TMK), and the track two data combined with Ki left to right as follows:

-   a. Using mod 10 addition, add Ki digits to the PAN excluding the     first 6 digits and the mod 10 check digit. Use the Ki digits from     leftmost in succession. -   b. Using mod 12 addition, add the expiration month with the next Ki     digit -   c. Using mod 100 addition add the expiration year with the next Ki     digit -   d. Using mod 10 addition, add the next three Ki digits to the three     service code digits.

A new mod 10 check character is generated for the modified data, and 5 added to the new check digit (mod 10) and placed into the track two data. The new key is output encrypted with the old key as a card swipe.

An example processor command request algorithm can be performed as now described. Where a card has been determined to be a command card, the algorithm generates a one time CTR (counter mode) TDES stream cipher encryption block Ki as follows:

-   a. Construct KA, a string of 64 bits consisting of concatenating,     from left to right -   i. PVV from track data divided by 2, The MKC from reader. -   ii. Pad remaining area with ‘0’, (0x30). -   b. Retrieve the domain key (DMK) and the terminal command (TCk) key     for the BIN value given. -   c. Compare the new MSC with the last stored value -   i. If new MSC is greater than the old MSC save the new value. -   ii. If new MSC is not greater than the old MSC flag a duplicate     transaction error. -   d. Encrypt Ka with UDKA, giving block Kb -   e. Decrypt Kb with TCk, giving block Kc -   f. Encrypt Kc with UDKA, giving block Kd -   g. Expand 64 bit block Kd into a 20 digit decimal value into giving     block Ke -   h. Drop the leftmost digit giving 19 digit stream cipher encryption     block Ki

The track two data is combined with Ki left to right as follows:

-   a. Using mod 10 subtraction, add Ki digits to the PAN excluding the     first six digits and the mod 10 check digit. Use the Ki digits from     leftmost in succession. -   b. Using mod 10 subtraction, subtract the next three Ki digits to     the three service code digits. -   c. Using mod 10 subtraction, subtract all remaining Ki digits from     the card data input stream.

The CRC is checked for valid command request, and if there is an error, the error is flagged and the routine exits. The expiration date is checked for a command type and the requested command is processed.

As a final example, an exemplary key change command algorithm is now described. Once the validity of the key change command request has been verified, the algorithm concatenates the following 20 digits into string KIN, leftmost right:

-   a. The seventh digit through the mod 10 check digit, (8 digits) -   b. The three service code digits -   c. The nine digits following the PVV

The algorithm compresses KIN to 8 bytes of binary data in block Kn, saves as the new terminal key TMK, and acknowledged the completed transaction to the terminal.

A few example commands were described above. In one embodiment, the command token is implemented to have a data format similar to non-command tokens. For example, in the bank card environment a command card can be implemented to have a similar data format. In one embodiment in this example, the command card data format is very similar to a standard card with the exception that the expiration date code year is 80. In such an embodiment, the month of the expiration date can be used to indicate the selected command. For example, If the mod 10-5 for the card passes and the command year and month indicate a valid command, the data capture device will execute the requested operation.

A few example command codes are provided below. Commands 01/80-05/80 can be completed with a terminal that is not connected to a network. The MSR status LED can be used to indicate a successful command operation. In one embodiment, command 06/80 can be accomplished online or with a simulator for the new key to be transmitted and saved. Terminal keys can have a key usage counter, for example with a range of 0-49,999. They can be configured such that after the max count is reached the counter rolls over. To protect the terminal key from compromise, the terminal key can be changed periodically. For example, at least once every 50K card swipes for the particular bin range using the key. Other considerations may require more frequent key updates.

01/80 Manufacturer Change/Set OEM Domain Key

-   -   The command is encrypted with the manufacturer domain and         terminal keys     -   Both the OEM domain and terminal key is set/updated with the 64         bit key     -   02/80 OEM Change/Set OEM terminal Key     -   The command is encrypted with the OEM domain and terminal keys.     -   The OEM domain key is set/updated     -   The OEM domain and terminal keys can be set to different         customers to have control over selected aspects of the MSR

03/80 OEM Change/Set BIN range domain key

-   -   The command is encrypted with the OEM domain and terminal keys.     -   The selected BIN range domain, terminal, and command are set to         the input key.     -   The OEM will typically use this card to initialize the MSR for a         specific customer     -   04/80 Distribution Change/Set BIN range domain key     -   The command is encrypted with the selected BIN range command and         terminal key.     -   The secure distribution provider will typically use this card to         set a number of terminals to accept the same domain key.     -   05/80 Distribution Change/Set BIN range command key     -   The command is encrypted with the selected BIN range domain and         terminal key.     -   The secure distribution provider will typically use this card to         set a number of terminals to accept the same command key.

06/80 Change/Set BIN range terminal key

-   -   The command is encrypted with the selected BIN range domain and         command key.     -   The secure distribution provider or service technician will         typically use this card to create a terminal generated and         encrypted terminal key.

Several operational scenarios are now described to further highlight features and advantages of the embodiments described above. The inventions described herein and their multiple embodiments are not limited to applications as discussed in these scenarios. These scenarios are included to provide additional descriptive materials.

In one embodiment of a data capture device, a custom ASIC is provided to perform functions of a head amplifier with integrated precision peak detector, a microcontroller to decode the output and an encryption module. The ASIC can be combined with a conventional processor, such as, for example, the Silicon Labs C8051F330 processor, and mounted on a printed circuit board roughly the size of the back of the magnetic head. An interface cable can be attached to the printed circuit board and the assembly mounted in shell of the magnetic head. The head can then potted with epoxy providing a secure barrier to the environment tampering.

A small amount of reactive material such as potassium can be placed in the module prior to potting so that if the unit is tampered with, the reactive material is exposed and causes a reaction destroying the sensitive circuit components. In addition, a fuse can be placed on the printed circuit board to allow the programming and debug connections to the microcontroller to be broken during final assembly of a product preventing access to the internal operations of the unit.

The microcontroller can be configured to decode the F2F data encoded on the card and to use algorithms to decode the F2F data into any of multiple standard formats including ISO 7811, AAMVA, JIS, CDL, raw data, and other common or custom formats. The converted track data can be then encrypted, for example, using two 64 bit keys which where previously stored in the flash memory of the controller. The data can be compressed and output in one of multiple formats.

The data output format can be selected using the head interface connector option pins of through sending a command through the Rx data pin. The interface formats that can be selected can include, for example, I.sup.2C, SPI, NRZ, USB and TTL clock and data. Additional formats can be supported including one that outputs the encrypted data in same F2F format that is encoded on the card at signal levels compatible with magnetic head output. This embodiment might be used to allow conventional devices to use the secure head module without changing the terminal hardware, software or firmware (other than the head, for example). In addition the secure head module can accept commands via the interface connecter Rx data line or through the use of specially formatted cards which are swiped to execute the commands. An additional format can be supported which supports RF communications via various standards such as, for example, Bluetooth. The data can be converted to a suitable format and sent to either a RF transceiver internal to the head module or connected to the head module though an interface connector cable.

These techniques can be implemented allow for command operations in a plurality of applications, including, for example WAP and java or Pocket PC thin client applications. In addition to the described card reader functions the unit can provide general purpose digital input/output pins at the interface connector. These pins can be controlled by custom applications such as, for example, those supplied by the OEM integrating the module in their products. These pins along with the ability to add custom application firmware to the head module allow for added functionality that without these options would require an additional processor and circuitry. One such example is in a serial RS232 stand alone magnetic stripe reader. The added interface pins can be used to control a status indicator and to control the RS232 output driver. In addition custom firmware can be added to output the suppliers banded information and to support custom formats such as those used at conferences to track attendees.

In one embodiment the gateway receives transaction requests from multiple devices employing encryption modules. In one embodiment in the example of bank card transactions, the transaction data can include the capture device serial number followed by three blocks of encrypted data containing the swiped card's track 2 data along with a time or transaction number stamp. A second optional data block can be included and can contain control information to enhance the server's optional application operations such as card authenticity verification, issuing merchant and command requests such as a change key request. Three optional clear text characters can be used to signal start of serial number, start of optional encrypted data block, and end of transaction blocks. The various clear text characters can also be used to indicate various encryption options such as selection between multiple encryption keys and formats.

In applications where transmission speed is a consideration (for example, in WAP applications), the transaction data format can be adjusted to be a multiple of three characters in length. All transaction data including the serial number, encrypted data blocks, and clear text fields can be sent as binary data. In this way a forty digit track two data block can be compressed from 40 to 20 bytes in length. The 8 digit serial number can be compressed to 3 bytes in length. This converted binary data can be converted to a format compatible with efficient keyboard emulation for the selected device. For example, in the case of WAP enabled cell phones with external keyboard support the 3 bytes of binary data can be converted to 4 mostly lower case ASCII characters. Using this technique the transaction data can be sent in 38 characters rather then the 68 characters required if the data was not compressed.

In another embodiment in the example of bank card transactions, the transaction data can include the terminal or data capture device serial number followed by three blocks of 3 DES encrypted data containing the swiped card's track 2 data along with a time or transaction number stamp. A second data block can contain the signature of the swiped card (encrypted or not) along with control information (encrypted or not) to enhance the server's optional application operations such as card authenticity verification, issuing merchant and command requests such as a change key request. Three optional clear text characters can be used to signal start of serial number, start of optional encrypted data block, and end of transaction blocks. The various clear text characters can also indicate various encryption options such as selection between multiple encryption keys and formats.

The gateway can have access to a secure database containing keys for all readers allowed access to the gateway along with information to complete the transaction such as the internet URL or the phone number of the transaction processing server to be used by this reader. In addition the gateway can have access to a database containing valid secure stripe TM signatures and authentication decryption keys. The reader serial number, which is sent as part of the transaction in clear text in one embodiment, is used to access the key for the readers track signature block along with information to complete the transaction such as the internet URL or the phone number of the transaction processing server to be used by this reader. The selected keys can be used to decode signature data along with a hash code generated by the secure module from the card data account number. The hash value generated from the card data can be used to index the secure stripe database to retrieve the card signature. The database signature is then compared to the decrypted transaction signature and based on the comparison the transaction is sent to the processing bank indicated in the signature database or a message is sent back to the card holder requesting verification of the card's authenticity which may be in the form of a re-swipe of the card or entry of additional information such as billing zip code at which point the transaction is sent to the processing bank using standard formats or declined.

In yet another preferred embodiment in the example of bank card transactions, the transaction data can include the transaction data can include the MSR serial number followed by blocks of encrypted data containing the swiped card's track information along with a time or transaction number stamp and GPS location. A second data block can contain the signature of the swiped card along with control information to enhance the server's optional application operations such as card authenticity verification, issuing merchant and command requests such as a change key request. Three optional clear text characters can be used to signal start of serial number, start of optional encrypted data block, and end of transaction blocks.

The various clear text characters can also indicate various encryption options such as selection between multiple encryption keys and formats. This gateway can have access to two databases one containing the secure data capture device module control block key and a second containing valid signatures (for example, SECURESTRIPE signatures). The reader serial number sent as part of the transaction in clear text in one embodiment can be used to access the key for the reader's track control and signature block. The signature can include of two parts: one is the signature value generated during the card swipe and a second is a hash code of that track two card data also generated during the swipe. The hash value is used to index the secure stripe database to retrieve the card signature. In this way, no card data is available on the secure server. The database signature is then compared to the decrypted transaction signature generating a card reliability index which is sent to the processing bank as additional information.

The bank also receives the encrypted card data that may include the time of the transaction, the location of the transaction, and the secure module's unique transaction number. With this additional information the bank can made a more accurate ascertainment of the transactions authenticity prior to acceptance or denial of the requested transaction.

In one embodiment, the encrypted information is stored as data in one of the tracks on the card. Typically, magnetic stripe cards, including most bank or credit cards have three tracks of data. For the access information, Tracks 1, 2 or 3 can be used. Note that in one environment, a conventional bank card may have traditional track 2 information encoded at 75 BPI. The tracks may not be perfectly timed and may include variations or jitter. In other words, the spacing between the transitions may vary from transition to transition and from card to card. Additionally, because of these variations and the characteristics of the flux patterns on the magnetic strip, it is difficult to accurately recreate, or copy, magnetic stripe data from an original token to a new token and maintain the same characteristics. These transition characteristics create a level of uniqueness in the magnetic stripe data. Furthermore, because of these variations, the relationship of the tracks to one another may be affected. Therefore, it may be useful to encipher the jitter data using a variable length block encoding cipher for increased security as well as coping with the inherent variability of the magnetic stripe record.

VDES and VAES are tweakable, variable input length block ciphers that encipher decimal numbers such as those found in account numbers for credit cards, charge cards, debit cards, and the like. The primitive used for embodiments of the invention is a tweakable block cipher for enciphering numbers up to m-digits in length. The value of m depends on the algorithm.

Let Dom be the set of all strings over Z10=10, . . . , 9) that have a length between 2 and m. The primitive is specified by an enciphering function

-   -   ε: TwSp×KeySp×Dom→Dom

and associated deciphering function

-   -   D: TwSp×KeySp×Dom→Dom

The notation means that encryption utilizes in this example three inputs: a tweak T, which is selected from the set TwSp of possible tweaks; a key K, which is selected from the set KeySp of possible keys; and the plaintext data P, which in this case is a d-digit number, where 2≦d≦m. The output, denoted ε(T, K, P), is another d-digit number. In an embodiment of the invention, the tweak T is the bank identification number (BIN), the last four digits of the account number, plus the expiration date of the token. In VDES, the key K comprises a DES key and two auxiliary 64-bit keys. In another embodiment of the invention, the key K comprises a single 128-bit AES key.

The deciphering algorithm reverses the enciphering, therefore,

-   -   D(T, K, ε(T, K, P))=P

The variable-length ciphers in embodiments of the present invention are designed to guard against an attacker who has access to the merchant terminal. In attempting to decrypt a target enciphered card, the attacker can create and swipe tokens or cards of its choice through the token reading device. This is known as a chosen plaintext attack in cryptographic terms.

To begin the scenario described above, a target tweak T* and a target plaintext P* are selected. Next, a target key K is chosen at random from KeySp. Ciphertext C*is computed where C*=ε(T*, K, P*). It is assumed that the attacker has: The target tweak T* and target ciphertext C*, and an enciphering oracle or device, Enc. The enciphering oracle may be viewed as a device that the attacker can call on for any inputs T, P of choice. The enciphering oracle returns ε (T, K, P). In this example the enciphering is done under the target key K, which the attacker does not have. To succeed, the adversary must output P*, the target plaintext.

The situation described above is comparable to that of an identity thief who has an enciphering of some of the digits of a user's account number, and also has the BIN, last four digits of the user's account and the expiration date of the account. The target plaintext P* is the digits of the user's account that are enciphered and which the thief does not have. The target ciphertext C* is the enciphered digits, where the enciphering is under the target tweak, and the target key K used is the key used in the merchant's terminal. The enciphering oracle models the possibility that an attacker can create and swipe, or read, cards of the attacker's choice. When the attacker does this, he effectively provides himself some tweak T and plaintext P and receives in return the enciphering ε(T, K, P) under the target key K. Generally, more effective security is provided as the encryption method chosen requires the attacker to make a higher quantities of encryption queries, or invest an increasing amounts of computer running time.

The algorithms in accordance with embodiments of the invention are now described. First, some functions auxiliary to the algorithms are described and defined. These functions are used in the algorithms as set forth herein.

NtS_(l) takes as input an integer N in the range 0≦N<2^(l) and returns its encoding as a binary string of exactly l bits. For example, NtS₆(3)=000011.

StN_(l) takes as input an l-bit string y and returns the integer N (0≦N<2^(l)) whose binary representation is y. For example, StN₆ (000011)=3.

NtD_(l) takes as an input an integer N in the range 0≦N<10^(l) and returns its representation as an l-digit number. For example, NtD₅(326)=00326. This operation consists merely of prepending sufficient zeros to bring the number of digits to exactly l. In addition, this provides for the variable block length in the cipher.

DtN takes as input an l-digit number y and returns the corresponding integer N (0≦N<10^(l)) for example DtN(00326)=326. This operation includes removing sufficient leading zeros and is a further example of the variable block length of the cipher.

|X|₁₀ denotes the number of digits in a digit-represented number. For example, |00326|₁₀=5. The leading zeros are counted.

N div D returns the quotient obtained when integer N is divided by integer D. For example, 17 div 2=8 and 14 div 2=7.

N mod D returns the remainder obtained when integer N is divided by integer D. This is an integer in the range 0, . . . , D−1. This operation may be applied even when N is negative. For example (30-70) mod 100=60.

If s₁, s₂, . . . , s_(n) are strings then s₁∥s₂˜ . . . ∥s_(n) denotes the concatenation of those strings.

If x is a 64-bit string, the x↓56 denotes the first 56 bits of x.

FIG. 36 shows an example variable-length encryption algorithm for enciphering and deciphering in accordance with one embodiment of the invention. This embodiment, which uses DES encryption, is now described in terms of example data parameters such as key length and tweak length. The key K=K₀∥K_(in)∥K_(out) in this example includes one 56-bit DES key and two auxiliary 64-bit keys, resulting in a total length of 184 bits in this embodiment.

The tweak T[0] . . . T[t−1] is a t-digit number. For a token access security application, such as described above, one example for the tweak can be defined to include the BIN, the last four digits of the account number and the expiration date of the card or token. In such a case t would be equal to fourteen—i.e., the tweak would be a 14-digit number. Although t can be chosen based on the needs of a given application, in various embodiments, the example algorithm is configured to handle a tweak of up to t=16. With the example algorithm, the tweak of length t is decided at the time the key is chosen. However, the algorithm can be extended to handle tweaks of variable length.

In various embodiments, the tweak can be an important aspect of the implementation. The actual tweak chosen can take a variety of forms and flexibility can used when choosing the tweak to implement. An example of the importance of the tweak can be illustrated in terms of a bank card environment where relatively short strings of symbols sets are encrypted. Indeed, for short PANs, the system might only be encrypting a few digits. In such uses, it would be trivial to build a dictionary with only a few digits worth of encrypted values. Accordingly, the tweak can be an important element of security in that it changes the encrypted values based on unencrypted values. Accordingly, this makes the size of the useful dictionary much larger thereby improving the security of the cipher.

The process begins with the step 3602 of identifying operators based on the number of digits, d, in the plaintext. The plaintext P[0] . . . P[d−1] is a d-digit number where d can range in some embodiments from 2 to 28. The algorithm can be implemented to split it into two parts roughly equal in size. The first part has d(0) digits and the second part has d(1) digits. For example, if d=5, the d(0)=2 and d(1)=3. Thus, in one embodiment, these operators are defined as

d(0)=d div 2

d(1)=d−d(0).

Accordingly, d(0) is defined as the whole number quotient obtained when the number of digits, d, is divided by two, and d(1) is the number of digits, d, less d(0). Therefore, d(1) and d(0) together represent the entire data length, d.

In steps 3604 and 3606, the parameters w₁ and w₂ are defined based on the tweak, and represented as a bit string. In this example, the number of digits t in the tweak and the number of digits d in the data are each converted to a string. These strings are padded with zeroes to create bit strings w₁ and w₂ of desired length. In one embodiment, the tweak is a one-byte string and padded with 48 zeroes to create a bit string for w₁ that is 56 bits in length. Particularly, in one embodiment, the tweak is first modified to remove leading zeroes. This can be done, for example, using the DtN, operation described above, which takes as input an l-digit number (in this case the tweak) and returns the corresponding integer value with leading zeroes removed. Then, the modified tweak is further modified to create the binary string for the desired number of bits, which in this example is 56. This can be done, for example, using the NtS_(l) operation described above (where l=56):

w ₁ =NtS ₅₆(DtN(T[0] . . . T[t−1]))

In step 3606 d digits of plaintext are converted to a fixed-length string, w₂. For example, in one embodiment, the plaintext digits are converted to a one-byte string. This can be done, fore example using:

w ₂ =NtS ₈(d)

where W2 is fixed length data that is eight bits long, and l=8.

In a step 3608 a key is defined. For example, in one embodiment the encryption algorithm DES is applied to the 64-bit string w₁∥w₂ with key, K₀, to produce a 64-bit string. The first 56 bits of the latter form the DES round key K₁.

K ₁ =DES(K ₀ w ₁ ∥w ₂)↓56

In step 3610, the data set is operated on in two sections, L₀ and R₀, and the leading zeros are removed from the plaintext strings for each section of the dataset. In one embodiment, the dataset is divided in half. The division of the dataset can be such that L₀ is P[0] to P[d(0)−1], and R₀ is Pd(0) to P[d−1], for a plaintext data set of length d. Removing the leading zeroes can be accomplished with the DtN operation as

L ₀ ←DtN(P[0] . . . P[d(0)−1])

R ₀ ←DtN(P[d(0) . . . P[d−1])

In step 3612 through 3618, L; and R; are determined for a number of rounds r, where i=1, . . . , r. The number r chosen is the number of rounds of processing for steps 3612-3618 described below. Security is typically increased with a greater number of rounds, r. An embodiment provides for an r of at least seven. In this case, with an r of seven, then a total of nine DES operations is required. In one embodiment, the maximum value of r is 2⁸−1, which comes from the fact that a round count of 1 byte (2⁸) is included in the round function. Increasing the number of rounds is computationally expensive, so preferably the number of rounds is chosen so as to not exceed that required to achieve the desired level of security.

Referring now to steps 3612-3618, in a step 3612, the current value of the left half L, L_(i), is set to the previous value of the right half R, R_(i)−1.

L _(i) =R _(i-1).

Step 3614 returns the remainder of i/2, which in one embodiment is calculated as s, where

s=1−(i mod 2).

In step 3616, x is defined as a 48 bit binary representation of R_(i-1). This can use the NtS_(l) operation, where

x=NtS ₄₈(R _(i-1)).

Next, in step 3618 R_(i) is calculated as a function. In one embodiment, this is a function combined with L_(i-1) where

R _(i)=(F(i,d,x)+L _(i-1))mod 10^(d(s)).

The computation of the Feistel F(i, d, x) in one embodiment is described in FIG. 5. The term in the modulo function, mod 10^(d(s)) is a modulo base ten addition of the current F(i, d, x) value and the contents of Li−1. This differs from the use of the EXCLUSIVE-OR function used in conventional solutions. The benefit of modulo addition and subtraction is that the output from the operation is the in the same format as the input. For example, in the case of bankcard transactions, these would be base 10 numerical digits in the range of zero through ten. Other modulo bases can be used to realize the same input to output correspondence for other datasets. For example, upper case alpha (base 26), upper and lower case alpha (base 52) or alpha-numeric (base 62) can be accommodated with the corresponding mod XX operation.

As stated above, steps 3612 through 3618 are repeated for r iterations. Accordingly, the value of i is checked in step 3620. If the value returned for i is less than or equal to r, then i is incremented, the process returns to step 3612, and the next iteration of Ri is calculated. If, on the other hand r rounds have already been run, the process continues to step 3622.

In step 3622 a function s is defined as the remainder of r divided by two

s=r mod 2.

At this point the first half of the output may be computed in step 3624. In this step, L_(r) is converted to a number of d(s) digits to form the first half of the output data according to the formula:

C _(out1) =C[0] . . . C[d(s)−1]=NtD _(d(s))(L _(r))

Next the second part of the output is computed in step 3626. In this step, Lr is converted to a number of d(s) digits to form the second half of the output data according to the formula:

C _(out2) =C[D(S) . . . C[d−1]=NtD _(d(1-s))(R _(r))

At this point, the process concludes, step 3628 and returns the d-digit cipher text string

C[0] . . . C[d−1].

FIG. 37 describes the operations of an example DES subroutine that computes the DES rounds described briefly above in accordance with one embodiment of the invention. The process begins with step 3702, which, in this example, concatenates the an 8-bit string of loopcount, i, with an 8-bits string of the data, d, and the 48-bit string of R_(i-1). This example is illustrated by the function

a=NtS ₈(i)∥NtS ₈(d)∥x.

The next step, 3704 performs DES encryption operations to get y. in one embodiment, a and K_(in), defined above, are encrypted using key K₁ and combined with K_(out). These operations take a 64 bit input string, a, and return a binary value of y. These operations are X OR operation on the DES with keys to form y, defined below:

y←DES(K ₁ ,a⊕K _(in))⊕Kout

Step 3706 is defines the function z, which in one embodiment is the operation to return y, as a 64-bit integer value, z. The equation defining z is shown below:

z←StN ₆₄(y)mod 10^(d(s)).

The process concludes when z is returned. This subroutine is repeated for each “round” of the DES function.

Several operational scenarios are now described to further highlight features and advantages of the embodiments described above. The inventions described herein and their multiple embodiments are not limited to applications as discussed in these scenarios. These scenarios are included to provide additional descriptive materials.

The variable DES algorithm offers numerous security advantages over a traditional DES algorithm. The VDES algorithm implements a Feistel network. The i-th round (1≦i≦r) splits the input into a left half of d(0) bits and a right half of d(1) bits if d is odd. It would be unusual for d to be odd, however. The variable nature of the VDES means that split sizes are not maintained across rounds as in traditional Feistel networks. Varying the split sizes does not appear to degrade security.

In order to accommodate enciphering digit sequences rather than bit sequences, the round function outputs digits. The traditional XORs have been replaced by modulo operations of appropriate powers of ten.

The round function is based on Data Encryption Standard Block Cipher-Key Whitening (known as DESX) and discussed in “How to Protect DES Against Exhaustive Key Search (an Analysis of DESX)” J. Kilian and P. Rogaway, J. Cryptology 14(l):17-35 (2001). The selection of DESX allows the same DES key to be used every round, instead of a different key every round, however, the effect of per round keys is induced by the inclusion of the round number in the DES output. This reduces key size and permits cost savings by reducing re-keying costs.

Tweakability is provided by specifying the round key K₁ as a pseudorandom function (PRF) of the tweak, the number t of digits in the tweak, and the number d, of digits in the input, under key K₀. (K₀ is part of the base key of the cipher). The role of the pseudorandom function is taken by the based DES based Cipher Block Chaining (CBC) MAC. In computing this CBC-MAC the number of iterations of DES is always exactly two, thereby providing security against splicing attacks. “Birthday” attacks may be possible, indicating that in approximately 232 calls to the encryption oracle, an attacker may find two different tweaks which result in the same round key K₁ and thus are equivalent from an encryption point of view. However, this does not appear to assist with plaintext recovery, which in the scenario of this application is the goal of the attacker. In addition, 232 is approximately four billion, and it is not clear that the number of tweaks in use is this high.

The round function converts bits to digits by interpreting the DESX output as an integer, and then takes the remainder upon division by the appropriate power of 10, as discussed above in the context of FIG. 37.

FIG. 38 provides a flowchart of the decryption process. Essentially, the decryption process reverses the steps of the encryption. The definitions used in encryption also apply to decryption.

The process begins with the step 3802 of identifying operators based on data length. These operators are defined as follows:

d(0)=d div 2

d(1)=d−d(0).

Steps 3804 and 3806 define the parameters w₁ and w₂ based on the tweak, and represents them as a bit string. In this example, the number of digits t in the tweak and the number of digits d in the data are each converted to a string. These strings are padded with zeroes to create bit strings w₁ and w₂ of desired length. In one embodiment, the tweak is a one-byte string and padded with 48 zeroes to create a bit string for w₁ that is 56 bits in length. Particularly, in one embodiment, the tweak is first modified to remove leading zeroes. This can be done, for example, using the DtN operation described above, which takes as input an l-digit number (in this case the tweak) and returns the corresponding integer value with leading zeroes removed. Then, the modified tweak is further modified to create the binary string for the desired number of bits, which in this example is 56. This can be done, for example, using the NtS₁ operation described above (where l=56):

w ₁ =NtS ₅₆(DtN(T[0] . . . T[t−1]))

At 3806, d digits of plaintext are converted to a fixed-length string, w₂. For example, in one embodiment, the plaintext digits are converted to a one-byte string. This can be done, fore example using:

w ₂ =NtS ₈(d)

where w₂ is fixed length data that is eight bits long, and l=8.

In step 3808 a key is defined. For example, in one embodiment the encryption algorithm DES is applied to the 64-bit string w₁∥w₂ with key, K₀, to produce a 64-bit string. The first 56 bits of the latter form the DES round key K₁.

K ₁ =DES(K ₀ w ₁ ∥w ₂)↓56

In step 3810, s is defined as the remainder of r divided by two

s←r mod 2.

At step 3812, the data set is operated on in two sections, L_(r) and R_(r), and the leading zeros are removed from the plaintext strings for each section of the dataset. In one embodiment, the dataset is divided in half. The division of the dataset can be such that L_(r) is C[0] . . . C[d(s)−1], and R_(r) is C[d(s) . . . C[d−1], for a plaintext data set of length d. Removing the leading zeroes can be accomplished with the DtN operation as

L _(r) ←DtN(C[0] . . . C[d(s)−1])

R _(r) ←DtN(C[d(s) . . . C[d−1]).

In steps 3811-3818, L_(i-1) and R_(i-1) are determined for a number of rounds r, where i=1, . . . , r.

In step 3811, R_(i-1) is defined as follows:

R _(i-1) ←L _(i)

Step 3813 returns the remainder of i/2, which in one embodiment is calculated as s, where

s=1−(i mod 2).

In step 3816, x is defined as a 48 bit binary representation of R_(i-1). This can use the NtS_(l) operation, where

x=NtS ₄₈(R _(i-1)).

-   a. Next, in step 3818 L_(i-1) is calculated as a function. In one     embodiment, this is as shown below:

L _(i-1)←(R _(i)−(F(i,d,x)(mod 10^(d(s)))).

The Feistel function, F(i, d, x), can be computed the same as it is in the encryption process such as, for example, as described above. The term in the modulo function, mod 10^(d(s)) is a 10 digit term and provides the variable length of the present embodiment of the invention to handle 10 integer digits. The mod operation may be adjusted to represent other forms of data such as, for example, the twenty-six letters of the alphabet in one case.

-   b. At this point in the operation the value of i is checked in step     3821.

i≦r

If the value returned for i is less than or equal to r, then the process increments i and returns to step 3811 and recomputes R_(i-1) and the subsequent steps in the round. If, on the other hand, the value returned at step 3821 is that i is larger than r and 1 the process continues to step 624.

-   c. At this point the first half of the output may be computed in     step 3824. In this step, L_(r) is converted to a number of d(s)     digits to form the first half of the output data according to the     formula:

P _(out1) =P[0] . . . P[d(0)−1]←NtD _(d(0))(L ₀)

-   d. Next the second part of the output is computed in step 3826. In     this step, Lr is converted to a number of d(s) digits to form the     second half of the output data according to the formula:

P _(out2) =P[D(0) . . . P[d−1]=NtD _(d(1-0))(R ₀)

-   e. At this point, the process concludes at 3828 and returns the     value below:

P[0] . . . P[d−1].

-   f. FIG. 39 provides another example encryption/decryption algorithm     for VDES in accordance with one embodiment of the invention. In the     embodiment illustrated in FIG. 7, the terms w₁, w₂, and K₁ are     defined differently.

w ₁ =NtS ₈(t)∥NtS ₈(d)∥NtS ₄₈(0)

w ₂ =NtS ₆₄(DtN(T[0] . . . T[t−1]))

K ₁ =DES(K ₀ ,DES(K ₀ ,w ₁)⊕w ₂)↓56

-   g. Also, in the example illustrated in FIG. 39, the subroutine for     computing the function for calculating R_(i) in the round, where z     is calculated as

z←StN ₆₄(y).

-   h. Likewise, similar changes to these factors are made in the     decryption process to mirror the changes in the encryption     algorithm. These are as also shown in FIG. 39. -   i. A first type of attack against VDES to be considered is the     exhaustive key search attack. This attack is impractical due to the     184 bit size of the cipher. A more important attack beyond the     exhaustive key search attack is Patarin's attack. Patarin's attack     is discussed in “Security of Random Feistel Schemes with Five or     More Rounds” J. Patarin, Advances in Cryptology—CRYPTO '04, Lecture     Notes in Computer Science Vol. 3152, M. Franklin ed.,     Springer-Verlag, 2004. Patarin's attack is ineffective against VDES     because it is a distinguishing attack, not a message recovery     attack. Recall that the goal of the attacker here is to recover the     message, in this case, the account number. A Patarin attack can     distinguish between an instance of the cipher and a random     permutation, but does not lead to recovery of the target plaintext     given the target ciphertext. In addition, a Patarin attack requires     a prohibitive amount of computation time, even when the number being     enciphered is only two digits long. The time would be significantly     increased by the ten to sixteen or more digits used in a typical     account number. -   j. A further embodiment of the invention provides a variable     advanced encryption standard (VAES) cipher that utilizes AES as part     of the encryption and decryption algorithms instead of the DES     cipher. FIG. 8 provides an example the encryption and decryption     algorithm for VAES in accordance with one embodiment of the     invention. The methodology for the VAES cipher in this example     generally follows that set forth above for the VDES cipher with a     few modifications. These modifications are now discussed in     accordance with one embodiment of the invention. -   k. Tweakability can be obtained by specifying the round key K₁ as a     pseudorandom function of the tweak, the number t of digits in the     tweak, and the number d of digits in the input, under key K₀. VAES     directly applies AES as the pseudorandom function, since the block     length is long enough to handle tweaks of sufficient length.     “Birthday” attacks are precluded since no two tweaks result in the     same common round key. While the key size of 128 bits is less than     VDES, the key size is large to enough to preclude exhaustive key     search attacks. Furthermore, Patarin's attack remains ineffective.     All of these features provide enhanced security. -   l. The key K=K₀ comprises a 128-bit AES key. The tweak, T[0] . . .     T[t−1], is a t-digit number. The tweak in some embodiments is of any     length in the range t=1 to t=33. The VAES algorithm in this     embodiment does not use w₁ and w₂ as was the case with the example     VDES described above. Instead a string w is formed, which in this     example is a 128-bit string is formed by concatenating the following     strings: a one byte representation of the number t of digits in the     tweak; a once byte representation of the number d of digits in the     plaintext; and a 112-bit representation of the tweak T[0] . . .     T[t−1].

w←NtS ₈(t)∥NtS ₈(d)∥NtS ₁₁₂(DtN(T[0] . . . T[t−1]))

-   m. The key in this example, K₁ is determined by an AES encrpytion of     w using K₀ as the key. This produces a 128-bit AES round key K₁.

K ₁ =AES(K ₀ ,w)

As with VDES, the data set is operated on in two sections, L₀ and R₀, and the leading zeros are removed from the plaintext strings for each section of the dataset. In one embodiment, the dataset is divided in half. The division of the dataset can be such that L₀ is P[0] to P[d(0)−1], and R₀ is Pd(0) to P[d−1], for a plaintext data set of length d. Removing the leading zeroes can be accomplished with the DtN operation as

L ₀ ←DtN(P[0] . . . P[d(0)−1])

R ₀ ←DtN(P[d(0) . . . P[d−1]).

Also, as with VDES. L_(i-1) and R_(i-1) are determined for a number of rounds r, where i=1, . . . r. However, with this example VAES algorithm, x is set as a 112-bit string representation of R_(i-1) as opposed to the 48-bit representation in the VDES example provided above. In an embodiment of the invention, the number of rounds is at least seven. The total cost of the algorithm is eight AES rounds. The maximum allowed value of r in some embodiments is 28-1.

The subroutine F(i, d, x) is also similar in this example, except that in this case, y is calculated as an AES encryption of a using key K₁, and is returned as a 128-bit value.

y←AES(K ₀ ,w);z←StN ₁₂₈(y)

-   a. VAES is simpler and yet offers more security than VDES, although     the algorithms are similar in design. VAES is capable of handling     longer tweaks and plaintexts than VDES.

Essentially, the decryption process reverses the steps of the encryption. The decryption process for this example VAES algorithm begins with the step of identifying operators based on data length. These operators are defined as follows:

d(0)=d div 2

d(1)=d−d(0).

-   a. Then, w is defined as set forth for the encryption process.

w←NtS ₈(t)∥NtS ₈(d)∥NtS ₁₁₂(DtN(T[0] . . . T[t−1]))

-   b. The key in this example, K₁ is determined by an AES encrpytion of     w using K₀ as the key. This produces a 128-bit AES round key K₁.

K ₁ =AES(K ₀ ,w)

A function s is defined as the remainder of r divided by two

s←r mod 2.

-   a. At this point the halves of the output may be computed. L_(r) and     Rr are defined as

L ₀ ←DtN(P[0] . . . P[d(0)−1])

R ₀ ←DtN(P[d(0) . . . P[d−1])

-   b. The following are several examples of format-preserving     encryption using a general cipher. These illustrate how general     ciphers can capture requirements and format-preservation constraints     that cannot be captured in the framework of enciphering over a     (single) finite set. The first example performs length-preserving     encryption of (varying length) credit card numbers. The second     example provides a general method for encrypting multi-alphabet     strings. The third example shows how to use this multi-alphabet     string cipher to perform format-preserving encryption of user     records as per the example discussed above. The technique throughout     utilizes the encode-then-encipher paradigm. For this section it is     assumed that access to a general cipher GE=(E,KeySp,TwSp, I,Dom)     with TwSp⊂{0, 1}* and with index set and domain sufficient for the     examples. -   c. Example 1: Credit Card Numbers -   d. In this example, the inputs are strings over_(—)={0, 1, . . . ,     9} where length C can vary, say from 4 to 20. This is because one     might want to encrypt varying amounts of the credit card numbers and     discretionary data, leaving the rest in place. For example, the BIN     or last four might be left in clear text, as might the cardholder's     name. The output must be a string over _* of the same length as the     input. (Note this example ignores the functioning of the Luhn     digit). Tweaks would be some of the (un-encrypted) credit card     number digits encoded into bit strings in a natural way. This can be     captured by setting by letting Domcc(l)=_l for all lεI={4, . . . ,     20}. We seek a general cipher GEcc=(E,KeySp,TwSp, I,Domcc), and use     the ability to have a domain with multiple sets in a crucial way to     capture the length-preservation requirement. GEcc is constructed     using encode-then-encipher with the enciphering via general cipher     GE. Let s(l)=10 l for lεI. Thus the indexes are just the number of     digits in the credit card number. Next the encoding function Enc and     decoding function Dec are described. Enc(l,X), where X is a sequence     of C decimal digits, simply views X as the decimal representation of     an integer N and returns N. Conversely for Dec. The final     enciphering algorithm is E T,l K (X)=Dec(l, ET,l K (Enc(l,X)). -   e. Example 2: Multi-Alphabet Strings -   f. This example constructs a general cipher for multi-alphabet     strings. A multialphabet string is a sequence of digits pk . . . pl     where piε_i for 1≦i≦k and alphabets _k, . . . , _(—)1. The index set     for the cipher is any sequence of (uniquely encoded descriptions of)     alphabets, e.g. _k_k−1 . . . _(—)1 for any alphabets _k for any k>1.     To any alphabet _, associate an injective map num_: _(—)→[0 . . .     |_(—)|−1]. Its inverse is denoted via char_. Next a general cipher     is constructed as GEmas=(^(˜)E,KeySp,TwSp, I,Dommas) that inherits     the key space and tweak space of the underlying general cipher GE,     has index set I specifying the space of arbitrary string formats     (the sequence of alphabets digits are taken from), and Dommas that     maps an index to a set Zs(l). Next the encode-then-encipher paradigm     is used with encoding and decoding functions as given as follows:

Enc(C, P) Parse l as _k, . . . , _(—)1

Parse P as pk, . . . , pl where piε_i x←num_(—)1 (pl)+Pk i=2 “num_i(pl)·Qj<i |_j|”

Return x Dec(l, y) Parse l as _k, . . . , _(—)1

For i=k to 2 do d←Qj<i |_j|;ci←└y/d┘; y←y−ci·d Return char_k (ck)k . . . kchar_(—)2 (c2)kchar_(—)1 (y)

-   g. Given an index C encoding alphabets _k, . . . , _(—)1, the     routines map a k-digit multi-alphabet string (from said alphabets)     to a numerical value between 0 and s(l)−1 where s(l)=Qk i=1 |_i|.     The domain map Dommas(l) outputs Zs(l). Notice that many values of C     will lead to the same Zn, but this will not be a problem either for     security or functionality. The final enciphering algorithm is     ^(˜)ET,l K (X)=Dec(l, ET,l K (Enc(l,X)). -   h. Example 3: Multi-Field Records -   i. This example is provided in terms of the example above, where a     name, address and credit card number are enciphered. The goal is to     have a format-preserving encryption that maps input plaintext     Name,Addr, CC to output ciphertext Name*,Addr*, CC*. Name and Name*     must consist of two strings of letters, each being an upper case     letter followed by lower case letters. Addr and Addr* must be     alphanumeric characters, spaces, or commas followed by a valid     postal code. CC and CC* must be 8-19 decimal digits followed by a     valid Luhn digit. These formats can be handled by interpreting a     record as a multi-alphabet string and using GEmas. All that is     needed is how to derive an index for a given record. Let _lc={a, . .     . , z}, _uc={A, . . . , Z}, _let=_lc∪_uc, _num={0, . . . , 9}, and     _α=_let ∪_num ∪{,}∪{     }. Let _zip be the set of all valid (5-digit US) postal (ZIP) codes.     Let _i cc be the set of all i-digit credit card numbers with valid     check digit. That is _i cc={nkL(n)|nε_i−1 num}. Write h_i to mean an     (unambiguous) encoding of _into a string. Assume an encoding for     which the concatenation of several such encodings can also be     unambiguously decoded. The input is the triple of strings     (Name,Addr, CC). Produce an index string l as follows. Initially set     l=ε. Scan Name from left to right. For the first character, append     h_uci to l. For each further non-space character in the first     string, append h_leti. Append h{     }i. Then append h_uci and append h_leti for each subsequent     character. Then scan Addr, appending h_αi for each character     stopping before the final 5 digit postal code. Append here h_zipi.     Finally, append h_cc ci where c is the number of decimal digits     in CC. The result is a string encoding the appropriate alphabets of     the characters used within the input record. (This example treats     the ZIP code and credit card number as individual characters from     particular alphabets.) Then encipher (for any desired tweak T) via     ^(˜)ET,l K (l, (Name,Addr, CC)). The ciphertext will have the     desired format. Note that ciphertexts contain all the information     required to reproduce the appropriate l for decryption. -   j. Embodiments of format-preserving Feistel cab be analyzed in terms     of previously proposed attacks and novel attacks. Patarin's attack     on Feistel networks is the only previous attack known to the     inventors that applies to Feistel networks with rounds greater     than 6. Recall, seven is the preferred minimum number of rounds.     This attack attempts to distinguish between a Feistel network and a     random permutation by making many queries. The attacker then     computes all possible round functions, and checks if the queries and     their responses are consistent with any one of the functions,     outputting 1 if so. This attack requires an intractable 12 amount of     computation, even for small sets. Consider attacking     format-preserving Feistel using r rounds on domain Zn for n=ab. Then     the number of possible instances of format-preserving Feistel is     C=(ab)└r/2┘·(ba)r−└r/2┘. For simplicity (it won't affect the     implications significantly) assume a=b, in which case C=ara. The     probability that a random function from Zn to Zn (ignore permutivity     constraints for simplicity) matches at least one of these functions     for any set of q distinct domain points is at most C/nq. To achieve     advantage one, then, the adversary needs to choose q so that C/nq=1.     Rearranging we have that ara=nq=a2q and this implies that q=ra/2.     Say a=b=10, which corresponds to using format-preserving Feistel to     encrypt 2-digit numbers, and r=7. Then q=70/2=35, which is pretty     small. Fortunately, the running time in this case is about     qC=35·1070≈2237, making the attack practically intractable. -   k. Highly unbalanced Feistel networks are susceptible to highly     efficient attacks that succeed with exponentially vanishing     probability as the number of rounds increases. Still, for small,     fixed round number, the attacks could be dangerous. Assume a PRP     adversary, A, against format-preserving Feistel for some l such that     split(l) outputs a, b. Assume without loss of generality that a≦b.     Let TεTwSp. Denote r(l) by r and assume r is even (the attack easily     extends to the case that r is odd). Then adversary A works as     described below. adversary AO(•,•,•):

L0

$←

Za; L′ 0←L0; R0

$←

Zb: R′0

$←

Zb\{R0}

Y←O(T, l, (L0+a·R0)); Y′←O(T, l, (L′ 0+a·R′0))

D←Y mod b; D′←Y′ mod b

If D−R0≡D′−R′0 (mod b) then Ret 1 Else Ret 0

-   l. First, analyze Pr[ARand     1]. Adversary A outputs 1 exactly when D−R0+R′0≡D′ (mod b). Thus     Pr[ARand     1]=1     a·1     b−1+a−1     a·1 -   m. Then, analyze Pr[AReal     1]. Let d=r/2. This is the number of times a value Ri is assigned in     E for i>0 and even. Let Z1, . . . , Zr be the outputs of the round     function F for rounds 1 to r (respectively) when evaluating ET,l K     (L0,R0) in response to A's first query. Similarly let Z′1, . . . ,     Z′r be the outputs of the round function F for rounds 1 to r     (respectively) when evaluating ET,l K (L′0,R′0) in response to A's     second query. -   n. Consider the situation in which Zi=Z′ i for all i>0 and i even.     This occurs with probability at least a−d. This is true because the     inputs to each of the relevant d round function applications will     collide with probability 1/a. Then, in this case it holds with     probability one that D−R0≡D′−R′0 (mod b) since:

D≡Rr≡R0+X;

i≦r, i even

Zi (mod b) and D′≡R′r≡R′0+X

i≦r, i even

Z′

i (mod b).

-   o. Therefore Pr[AReal     1]≧a−d. Combining this with the upper bound on Pr[ARand     1] given above yields

Advprp

format-preserving Feistel(A)≧ 1 ad− 1 a(b−1)− a−1 ab.

-   p. For certain values of a, b, r this is large. Say r=7 and N=2p for     some relatively large prime p. Then a=2, b=p and A's advantage is     ⅓−1/(2p−2)−½p.

The above attack can be adapted to mount message recovery attacks. The distinguishing attack establishes a relationship D−R0≡D′−R′0 (mod b) for distinct messages with high probability. If R0 is unknown, one can recover it if D, D′, and R′0 are known. This requires a single known-plaintext and its associated ciphertext, which will have the desired collisions with the unknown plaintext with probability a−d. From the known plaintext, ciphertext pair one can recover the unknown plaintext portion R0. Then L0 can be guessed (with probability of success 1/a). The attack succeeds in recovering the full plaintext with probability at least a−d−1.

As used herein, the articles “a” or “an” when referring to an item are not limited to requiring one and only one of the referenced item, and the various embodiments can include additional of the referenced items (or an alternative item) unless the context clearly dictates otherwise. As used herein, the terms “module” and “control logic” are used to describe a given unit of functionality that can be performed in accordance with one or more embodiments of the present invention. As used herein, a module or control logic can be implemented utilizing any form of hardware, circuitry, processing systems, software (including firmware), or a combination thereof. In implementation, the various control logic blocks or modules described herein can be implemented as discrete components or the functions and features described can be shared in part or in total among one or more modules and control logic items. Likewise, although a given item may be described as a module, that item may itself contain various modules to perform desired functionality. As would be apparent to one of ordinary skill in the art after reading this description, the various features and functionality described herein may be implemented in any given application can be implemented in one or more separate or shared modules or logic in various combinations and permutations.

Where features of the invention are implemented in whole or in part using software, in one embodiment, these elements can be implemented using a computing system capable of carrying out the functionality described with respect thereto. One such example computing system is shown in FIG. 35. Various embodiments are described in terms of this example computing system 900. After reading this description, it will become apparent to a person skilled in the relevant art how to implement the invention using other computing systems or architectures.

Referring now to FIG. 35, computing system 900 may represent, for example, desktop, laptop and notebook computers; hand-held computing devices (PDA's, cell phones, palmtops, etc.); mainframes, supercomputers, or servers; or any other type of special or general purpose computing devices as may be desirable or appropriate for a given application or environment. Computing system 900 can include one or more processors, such as a processor 904. Processor 904 can be implemented using a general or special purpose processing engine such as, for example, a microprocessor, controller or other control logic. In the example illustrated in FIG. 18, processor 904 is connected to a bus 902 or other communication medium.

Computing system 900 can also include a main memory 908, preferably random access memory (RAM) or other dynamic memory, for storing information and instructions to be executed by processor 904. Main memory 908 also may be used for storing temporary variables or other intermediate information during execution of instructions to be executed by processor 904. Computing system 900 can likewise includes a read only memory (“ROM”) or other static storage device coupled to bus 902 for storing static information and instructions for processor 904.

The computing system 900 can also include information storage mechanism 910, which can include, for example, a media drive 912 and a removable storage interface 920. The media drive 912 can include a drive or other mechanism to support fixed or removable storage media. For example, a hard disk drive a floppy disk drive, a magnetic tape drive, an optical disk drive, a CD or DVD drive (R or RW), or other removable or fixed media drive. Storage media 918, can include, for example, a hard disk, a floppy disk, magnetic tape, optical disk, a CD or DVD, or other fixed or removable medium that is read by and written to by media drive 914. As these examples illustrate, the storage media 918 can include a computer usable storage medium having stored therein particular computer software or data.

In alternative embodiments, information storage mechanism 910 may include other similar instrumentalities for allowing computer programs or other instructions or data to be loaded into computing system 900. Such instrumentalities can include, for example, a removable storage unit 922 and an interface 920. Examples of such can include a program cartridge and cartridge interface, a removable memory (for example, a flash memory or other removable memory module) and memory slot, and other removable storage units 922 and interfaces 920 that allow software and data to be transferred from the removable storage unit 918 to computing system 900.

Computing system 900 can also include a communications interface 924. Communications interface 924 can be used to allow software and data to be transferred between computing system 900 and external devices. Examples of communications interface 924 can include a modem, a network interface (such as an Ethernet or other NIC card), a communications port (such as for example, a USB port), a PCMCIA slot and card, etc. Software and data transferred via communications interface 924 are in the form of signals which can be electronic, electromagnetic, optical or other signals capable of being received by communications interface 924. These signals are provided to communications interface 924 via a channel 928. This channel 928 can carry signals and can be implemented using a wireless medium, wire or cable, fiber optics, or other communications medium. Some examples of a channel can include a phone line, a cellular phone link, an RF link, a network interface, a local or wide area network, and other communications channels.

In this document, the terms “computer program medium” and “computer usable medium” are used to generally refer to media such as, for example, memory 908, storage device 918, a hard disk installed in hard disk drive 912, and signals on channel 928. These and other various forms of computer usable media may be involved in carrying one or more sequences of one or more instructions to processor 904 for execution. Such instructions, generally referred to as “computer program code” (which may be grouped in the form of computer programs or other groupings), when executed, enable the computing system 900 to perform features or functions of the present invention as discussed herein.

In an embodiment where the elements are implemented using software, the software may be stored in a computer program medium and loaded into computing system 900 using removable storage drive 914, hard drive 912 or communications interface 924. The computer program logic (in this example, software instructions or computer program code), when executed by the processor 904, causes the processor 904 to perform the functions of the invention as described herein.

While various embodiments of the present invention have been described above, it should be understood that they have been presented by way of example only, and not of limitation. Likewise, the various diagrams may depict an example architectural or other configuration for the invention, which is done to aid in understanding the features and functionality that can be included in the invention. The invention is not restricted to the illustrated example architectures or configurations, but the desired features can be implemented using a variety of alternative architectures and configurations. Indeed, it will be apparent to one of skill in the art how alternative functional, logical or physical partitioning and configurations can be implemented to implement the desired features of the present invention. Also, a multitude of different constituent module names other than those depicted herein can be applied to the various partitions. Additionally, with regard to flow diagrams, operational descriptions and method claims, the order in which the steps are presented herein shall not mandate that various embodiments be implemented to perform the recited functionality in the same order unless the context dictates otherwise.

Although the invention is described above in terms of various exemplary embodiments and implementations, it should be understood that the various features, aspects and functionality described in one or more of the individual embodiments are not limited in their applicability to the particular embodiment with which they are described, but instead can be applied, alone or in some combination, to one or more of the other embodiments of the invention, whether or not such embodiments are described and whether or not such features are presented as being a part of a described embodiment. Thus the breadth and scope of the present invention should not be limited by any of the above-described exemplary embodiments.

Terms and phrases used in this document, and variations thereof, unless otherwise expressly stated, should be construed as open ended as opposed to limiting. As examples of the foregoing: the term “including” should be read as mean “including, without limitation” or the like; the term “example” is used to provide exemplary instances of the item in discussion, not an exhaustive or limiting list thereof; and adjectives such as “conventional,” “traditional,” “normal,” “standard,” “known” and terms of similar meaning should not be construed as limiting the item described to a given time period or to an item available as of a given time, but instead should be read to encompass conventional, traditional, normal, or standard technologies that may be available or known now or at any time in the future. Likewise, where this document refers to technologies that would be apparent or known to one of ordinary skill in the art, such technologies encompass those apparent or known to the skilled artisan now or at any time in the future.

A group of items linked with the conjunction “and” should not be read as requiring that each and every one of those items be present in the grouping, but rather should be read as “and/or” unless expressly stated otherwise. Similarly, a group of items linked with the conjunction “or” should not be read as requiring mutual exclusivity among that group, but rather should also be read as “and/or” unless expressly stated otherwise. Furthermore, although items, elements or components of the invention may be described or claimed in the singular, the plural is contemplated to be within the scope thereof unless limitation to the singular is explicitly stated.

The presence of broadening words and phrases such as “one or more,” “at least,” “but not limited to” or other like phrases in some instances shall not be read to mean that the narrower case is intended or required in instances where such broadening phrases may be absent. The use of the terms “module” and “appliance” or the depiction of a box in a diagram does not imply that the components or functionality described or claimed as part of that item are all configured in a common package. Indeed, any or all of the various components of an item, whether control logic or other components, can be combined in a single package or separately maintained and can further be distributed across multiple locations. Likewise, multiple items can he combined into single packages or locations.

Additionally, the various embodiments set forth herein are described in terms of exemplary block diagrams, flow charts and other illustrations. As will become apparent to one of ordinary skill in the art after reading this document, the illustrated embodiments and their various alternatives can be implemented without confinement to the illustrated examples. For example, block diagrams and their accompanying description should not be construed as mandating a particular architecture or configuration. 

1. A method of encrypting data, comprising: selecting clear text data; selecting a symbol set corresponding to the clear text data, wherein the symbol set is an arbitrary string symbol set comprising N members, each of which represents a data element in the clear text data; defining a first portion and a second portion of the clear text data; generating an encryption mask based on an encryption of the second portion using a key; and encrypting the clear text data by applying the encryption mask to the first portion using a modulus N+1 operation while not encrypting the second portion, thereby resulting in encrypted data comprising an encrypted first portion and an unencrypted second portion; wherein the encrypted data has the same format and length as the clear text data, and uses the same symbol set as the clear text data.
 2. The method of claim 1, wherein the modulus operation is a modulus addition.
 3. The method of claim 1, wherein the modulus operation is a modulus subtraction.
 4. The method of claim 4, wherein the clear text data comprises a PAN.
 5. The method of claim 4, wherein the clear text data comprises discretionary data.
 6. The method of claim 1, wherein the arbitrary string symbol set comprises 26 characters that represent letters of an alphabet and wherein the modulus operation is a modulus 26 operation.
 7. The method of claim 1, wherein encrypting the second portion using the key involves a multi-alphabet string cipher.
 8. The method of claim 1, further comprising transmitting the encrypted data to a remote device.
 9. The method of claim 1, further comprising transmitting the encrypted data to a remote device over a public network.
 10. A method of decrypting data, comprising: receiving encrypted data; selecting a symbol set used to encrypt clear text data to encrypted data, wherein the symbol set is an arbitrary string symbol set comprising N members, each of which represents a data element in the clear text data; defining a first portion and a second portion of the encrypted data, where the encrypted data comprises an encrypted first portion and an unencrypted second portion; generating an encryption mask based on an encryption of the second portion using a key; and decrypting the encrypted data by applying the encryption mask to the first portion using a modulus N+I operation, thereby resulting in clear text data comprising an unencrypted first portion and an unencrypted second portion; wherein the encrypted data has the same format and length as the clear text data, and uses the same symbol set as the clear text data.
 11. The method of claim 10, wherein the modulus operation is a modulus addition.
 12. The method of claim 10, wherein the modulus operation is a modulus subtraction.
 13. The method of claim 10, wherein the modulus operation is complementary to a second modulus operation used during the encryption of the clear text data to encrypted data. 